VBA Insert top border for a row when cell content is different from the last row. Sub Macro1() ' Dim strText As String Dim strText2 As String i = 2 For i = 2 To 4000 strText = Cells(i, 5).Value strText2 = Cells(i + 1, 5).Value If (strText <> strText2) Then Rows(i + 1).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone Selection.Borders(xlEdgeLeft).LineStyle = xlNone With Selection.Borders(xlEdgeTop) ...
Applies To : Word 2016 Word 2013 Word 2010 Word 2007 The Normal.dotm template opens whenever you start Microsoft Word, and it includes default styles and customizations that determine the basic look of a document. On the File tab, click Open . Go to C:\Users\ user name \AppData\Roaming\Microsoft\Templates. Open the Normal template ( Normal.dotm ). Make any changes that you want to the fonts, margins, spacing, and other settings. You can use the same commands and features that you use to change a document — but remember that any changes that you make to Normal.dotm will be applied to documents that you create in the future. When you have finished, click the File tab, and then click Save . NOTE : If Normal.dotm is renamed, damaged, or moved, Word automatically creates a new version (which uses the original default settings) the next time that you start Word. The new version will not include any of the customizations that you made to the version that you renamed or move...
留言
張貼留言