Quantcast
Viewing all articles
Browse latest Browse all 2703

sum below until blank cell

Hello,
I have a report that we convert from PDF into Excel every month and I need to total it by participant. I have pulled out the time from Col. B into Col. C so it can calculate. Next, I was going to have it look for the word "time", move 1 column right, then insert a function to add what is below it, not above it. There are varying lengths of rows, so I was going to have it add until it reached a blank cell. Then loop, or repeat, until there is no more data. Here is what I have that doesn't work.

' Find "Time" and move 1 cell to the right. Enter sum formula to add down until blank cell.
Cells.Find(What:="Time", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Activate
ActiveCell.FormulaR1C1 = "=SUMPRODUCT(OFFSET(C3,,,MATCH(TRUE,C2:C65536="",) ))"

I attached a sample of the data so you can see why I can't use subtotals or sum the cells above the active cell like normal. Any help is appreciated.

Viewing all articles
Browse latest Browse all 2703

Trending Articles