PDA

View Full Version : Formatting specific cells



Klartigue
02-08-2012, 09:33 AM
I have the below reference, but how do I get this to format the second to last row, as I have stated below, but only going from A to AH?

Sub FormatRow()
' Format Row
Dim LastRow As Long

With ActiveSheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row - 1
Rows(LastRow).Select

Selection.RowHeight = 6.75
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThick
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.RowHeight = 9
End With

End Sub


THanks for the help!