Sumproduct not equal to

Mtyler

Board Regular
Joined
Oct 13, 2006
Messages
62
Hi

I've trawled through a few other threads on this and come up with the following formula:

=SUMPRODUCT(INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$bp$8:$bp$340"),1-ISNUMBER(MATCH(INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340"),Summary!$K$44:$K$53,0)),--(May!$E$8:$E$340=Summary!$M41))

Whereby INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$bp$8:$bp$340") is the range to be summed,

INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340") is the range to review for all values excluding those in found in the range Summary!$K$44:$K$53 (which are formula entries to give a whole integer)

and this needs to be carried out for entries where values in May!$E$8:$E$340 equal Summary!$M41.

Unfortunately, the whole formula doesn't work. May!$E$8:$E$340=Summary!$M41 works, but it doesn't exclude those entries where the range in INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340") does not equal Summary!$K$44:$K$53,0).

Any assistance to correct this formula would be greatly received, or any easier way to complete my task. Basically what I'm doing is producing a top ten results per state (from the multistate list) based on a rank formula, and then trying to use this formula to sum the remaining files in each state, excluding those included in the top ten analysis.

Thanks

Matt
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi

I've trawled through a few other threads on this and come up with the following formula:

=SUMPRODUCT(INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$bp$8:$bp$340"),1-ISNUMBER(MATCH(INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340"),Summary!$K$44:$K$53,0)),--(May!$E$8:$E$340=Summary!$M41))

Whereby INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$bp$8:$bp$340") is the range to be summed,

INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340") is the range to review for all values excluding those in found in the range Summary!$K$44:$K$53 (which are formula entries to give a whole integer)

and this needs to be carried out for entries where values in May!$E$8:$E$340 equal Summary!$M41.

Unfortunately, the whole formula doesn't work. May!$E$8:$E$340=Summary!$M41 works, but it doesn't exclude those entries where the range in INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340") does not equal Summary!$K$44:$K$53,0).

Any assistance to correct this formula would be greatly received, or any easier way to complete my task. Basically what I'm doing is producing a top ten results per state (from the multistate list) based on a rank formula, and then trying to use this formula to sum the remaining files in each state, excluding those included in the top ten analysis.

Thanks

Matt
The formula works for me.

I'd write it a bit differently:

=SUMPRODUCT(--(ISNA(MATCH(INDIRECT(TEXT(EOMONTH(date,-1),"mmm")&"!CA8:CA340"),Summary!$K$44:$K$53,0))),--(May!$E$8:$E$340=Summary!$M41),INDIRECT(TEXT(EOMONTH(date,-1),"mmm")&"!BP8:BP340"))
 
Upvote 0
T Valko

Thanks for your help - I've just figured out that I was using the wrong range

INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340")

needed to be

INDIRECT(TEXT((Date,"mmm")&"!$ca$8:$ca$340")
 
Upvote 0
T Valko

Thanks for your help - I've just figured out that I was using the wrong range

INDIRECT(TEXT(EOMONTH(Date,-1),"mmm")&"!$ca$8:$ca$340")

needed to be

INDIRECT(TEXT((Date,"mmm")&"!$ca$8:$ca$340")
Good deal. Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

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