SUMPRODUCT OR SUM(IF ?

evanslee

New Member
Joined
Sep 15, 2006
Messages
19
Ok, heres what i need to do...
Similar too...

=SUMPRODUCT(--('Sheet1'!$K$2:$K$3223>=B5),--('Sheet1'!$K$2:$K$3223<B6))

but, i want to
  • SUM(Sheet2!E2:E3223)
but only where it matches
  • ('Sheet1'!$K$2:$K$3223>=B5),--('Sheet1'!$K$2:$K$3223<B6)

Should I be using some kind of SUM(IF statement ?

Regards,
Lee
 
Don't you have columns B and C the wrong way round? If your data is as you show it then I presume you need

=SUMPRODUCT(--(Sheet1!$A$1:$A$10="n"),--(Sheet1!$C$1:$C$10="y"),Sheet1!B1:B10)

this formula doesn't need to be array entered
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Code:
=SUMPRODUCT(SUM(IF(--(Sheet1!$A$1:$A$10="n"),--(Sheet1!$B$1:$B$10="y"),Sheet1!C1:C10)))

Thanks again

Lee

arghhhhh, I had the reference wrong, what a stupid mistake. sorry to all, you had it correct all along ! thanks so much, I have a red face now.

When do i need to enter it as an array and when dont I ?

Thanks houdini, your a star!
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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