I am writing code to format a spreadsheet based on subtotals. The problem is that I need to allow the user a variable number of rows based on where their total is. (i.e. They add and delete rows often)
I want to count the number of rows above the word Total.
I get stuck on actually counting the number of rows.
Range("D1"
.Select
Cells.Find(What:="total", After:=ActiveCell,_ LookIn:=xlFormulas, LookAt _:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _False).Activate
Any help would be greatly appreciated
I want to count the number of rows above the word Total.
I get stuck on actually counting the number of rows.
Range("D1"
Cells.Find(What:="total", After:=ActiveCell,_ LookIn:=xlFormulas, LookAt _:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _False).Activate
Any help would be greatly appreciated