Expand SUMPRODUCT(SUMIF(INDIRECT)) Formula

chrisguk

Board Regular
Joined
Jan 10, 2011
Messages
135
Hi,

I have this formula which works perfect for my needs. As you can see it looks up the values in the sheets named Jan, Feb , Mar etc etc. The Criteria H$5:S$5 is as follows:

JanFebMarAprMayJunJulAugSepOctNovDec

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>




fx: =IFERROR(T6-SUMPRODUCT(SUMIF(INDIRECT("'"&H$5:S$5&"'!"&"A$4:A$30");B6;INDIRECT("'"&H$5:S$5&"'!"&"D$4:D$30")))


AB
ItemType of invoice
item1Invoice
item2UIS
item3ID

<tbody>
</tbody>

What I need is for the formula only to produce a result if the column B = Invoice

If none of this makes sense I can post here a snip of the sheets, if you can tell me how I can do that in a formatted way?

Many thanks in advance
Chris
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try...
Rich (BB code):
=IFERROR(T6-SUMPRODUCT(SUMIFS(INDIRECT("'"&H$5:S$5&"'!"&"D$4:D$30");
    INDIRECT("'"&H$5:S$5&"'!"&"A$4:A$30");B6;INDIRECT("'"&H$5:S$5&"'!"&"B$4:B$30");"invoice"))
 
Last edited:
Upvote 0
Thank you,

Your solution works perfect and it also helped me understand SUMIFS better. This is a much more flexible method.
 
Upvote 0

Forum statistics

Threads
1,216,880
Messages
6,133,209
Members
449,788
Latest member
sutthipv

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