Hey guys,
I hope you can help me since I cannot seem to find the piece of code necessary to perform the following action.
Have tried multiple last-row codes but nothing worked.
I use Excel 2007 with Windows XP
I have a set of data ranging from column A to S. The amount of collumns varies.
Already managed to pull sums/averages in the first empty cell per column. This row (with the sums and averages) needs to be in different colours now, just like the first row in the sheet.
The first row was pretty easy and looks like that:
Range("A1:S1").Select With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.499984740745262
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
I need to perform the same formatting for the last row with data (sums/averages). However, since there is only data in column A to S and the amount of rows varies, I need a piece of code that only selects the last row from column A to S.
I appreciate your help very much!
Regards
Awasi
I hope you can help me since I cannot seem to find the piece of code necessary to perform the following action.
Have tried multiple last-row codes but nothing worked.
I use Excel 2007 with Windows XP
I have a set of data ranging from column A to S. The amount of collumns varies.
Already managed to pull sums/averages in the first empty cell per column. This row (with the sums and averages) needs to be in different colours now, just like the first row in the sheet.
The first row was pretty easy and looks like that:
Range("A1:S1").Select With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.499984740745262
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
I need to perform the same formatting for the last row with data (sums/averages). However, since there is only data in column A to S and the amount of rows varies, I need a piece of code that only selects the last row from column A to S.
I appreciate your help very much!
Regards
Awasi