Home » excel » excel – Sum values until next blank in a column (variable number between each blank), then repeat process for each set between blanks

excel – Sum values until next blank in a column (variable number between each blank), then repeat process for each set between blanks

Posted by: admin May 14, 2020 Leave a comment

Questions:

Essentially what I would like to do is sum up the values of some cells in a column (D) until the next blank in the column (D), while reporting the totals in columns (F) and (G) in line with the identifier in column (B). The blanks in column (D) line up with the identifiers in column (B). The attached image shows the example data that I am working with.

From the example data what I want to do is report the total emails from each individual email for sent (column D) and received (column E) for each salesperson (column B). I need this total to be generated in the highlighted cells in columns F and G in line with the Salesperson identifier in column B.

Example Sheet

Thank you for your help!

How to&Answers:

In F2 put:

=IF($B2<>"",SUM(D2:D$1040000)-SUM(F3:F$1040000),"")

Copy over one column and down the data set. The correct answer will not appear till you fill the column with the formula down the data set as it relies on the data beneath it.

enter image description here

Answer:

Here is an interesting alternative which does not rely upon the result of the formulas below:

=IF(D3<>"","",SUMPRODUCT(D4:D27*(ROW(D4:D27)<MATCH(TRUE, INDEX(ISBLANK(D4:D27), 0, 0), 0)+ROW(D3))))

enter image description here