=SUMIF(J4:J60000,"",P4:P60000)
Above is my formula. The range is to 60000 because the end of the records vary. Formula is in P1. I want it to be based on the last records in I.
There are similar formulas in M2 and P2 that I will use the same logic for to only sum at the end of the records in column I. All the data will have varying rows.
Bookmarks