For the large amount of tables I create daily I am making a macro that will select the header, subtotal, and grand total rows so I can then format things like the border, font, color, etc. The reason for this is I can have several dozen subtotal rows and it gets to be time consuming to manually highlight each one of them. I have the code for all the formatting I need. For the header, since it always start in A3, I am using the following code:
What I can't figure out is how to have the macro find and select the subtotal and grand total cells and not the entire row since they are never in the same spot. I figured it could be done using some kind of search function in column A for "Total" where any time it came across it, it would select the cell and some variation of the code above would select the rest of the row out to the last cell with data. What would that search function look like? Also, what would I replace "A3" with since the range will never be the same? Would "ActiveCell" work? Thanks in advance for any help.Dim Rng As Range Set Rng = Range("A3").CurrentRegion.Rows(1)