How to handle Blank Cells when using SUMPRODUCT(), SUMIF(), and INDIRECT()

RAF43

Board Regular
Joined
Sep 20, 2013
Messages
58
Hi All -

I'm working on a project that has a number of worksheets structured like below. It's a design that can not be changed. I'm not quite sure how to handle the blanks below the names. I'm wanting to sum for columns C & D on a summary sheet, including all the blanks until another name appears.

For example:
On the summary sheet in column B2 returns: =SUMPRODUCT(SUMIF(INDIRECT("'2'!B5:B28"),$A6, (INDIRECT("'2'!C5:C28")))) returns 1. I want it to return 5 and sum all the blanks below the criteria (A6) name on the summary sheet..
On the summary sheet in column C2 returns: =SUMPRODUCT(SUMIF(INDIRECT("'2'!B5:B28"),$A6,(INDIRECT("'2'!D5:D28")))) returns 0. I want it to return 4 and sum all the blanks below the criteria (A6) name on the summary sheet..

On the summary sheet in column B3 returns: =SUMPRODUCT(SUMIF(INDIRECT("'2'!B5:B28"),$A7,(INDIRECT("'2'!C5:C28")))) returns 2. I want it to return 8 and sum all the blanks below the criteria (A7) name on the summary sheet.
On the summary sheet in column C3 returns: =SUMPRODUCT(SUMIF(INDIRECT("'2'!B5:B28"),$A7,(INDIRECT("'2'!D5:D28")))) returns 1. I want it to return 4 and sum all the blanks below the criteria (A7) name on the summary sheet.

So in other words, how do I get it to sum for the blank cells below the name ... until another name appears ? Any ideas how to best tackle this one ?

Many thanks -
Randy

Summary Sheet returns the following from below worksheet structure
Name Lab Lec
John Doe10
Jack Doe21

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>


Date InstructorLabLec
4/21/2013 John Doe1.00
1.00
1.002.00
1.002.00
1.00
4/22/2013 Jane Doe2.001.00
2.001.00
2.001.00
2.001.00

<tbody>
</tbody>
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,215,647
Messages
6,126,006
Members
449,280
Latest member
Miahr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top