I know this question may get asked a lot, but I haven't been able to find or understand the answer for exactly what I am looking for.
I am learning VBA in excel for the first time today and I am trying to auto-format a table of values and want this to work on different range sizes.
I am stuck on how to select the row underneath the last row in my selection and format it.
My code so far is:
Selection.CurrentRegion.Select
Selection.Rows("1:1").Interior.Color = 12155648
With Selection.Rows("1:1").Font
.ThemeColor = xlThemeColorDark1
.Bold = True
End With
Selection.CurrentRegion.Select
Selection.Cells(Selection.Rows.Count, Selection.Columns.Count).Select
Selection.Interior.Color = 12632256
Selection.Font.Bold = True
Selection.Range("A1").Value = "Total"
What I want to happen: