Help!!! formula mess

arnoldmiranda

Board Regular
Joined
Jul 15, 2002
Messages
233
Hi,
I somehow am not getting my result, which should be the sum of sheet1 og column J

=IF(SUMPRODUCT(--(Sheet1!B:B=Sheet2!B3),--(SUMPRODUCT(Sheet1!E:E<>Sheet2!A1))),SUM(Sheet1!J2:J10),"")

Appreciate some help

Thanks
 

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 somehow am not getting my result, which should be the sum of sheet1 og column J

=IF(SUMPRODUCT(--(Sheet1!B:B=Sheet2!B3),--(SUMPRODUCT(Sheet1!E:E<>Sheet2!A1))),SUM(Sheet1!J2:J10),"")

Appreciate some help

Thanks

This part will make an array of 1's & 0's for everything that matches whatever is in Sheet 2 B3 SUMPRODUCT(--(Sheet1!B:B=Sheet2!B3)

and the next part will do the same with everything that is nit = Sheet2 A1
SUMPRODUCT(Sheet1!E:E<>Sheet2!A1) and thereafter your Sumproduct stops. You have that as the start of your If statement but as is your Sumproduct isn't summing anything.....

you may be better trying to upload a small sample. Your If isn't actually comparing the Sumproduct to anything and therefore your next argument won't kick in

Try this

SUMPRODUCT(--(Sheet1!J2:J10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1),Sheet1!J2:J10)) The arrays need to be the same size
 
Last edited:
Upvote 0
so is this what you want??

PHP:
=SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1),(Sheet1!J2:J10))
 
Upvote 0
Hi,

=SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1),(Sheet1!J2:J10))

Ths is exactly what I needed, thanks...I have another query though, based on the first two confitions can I use this formula to do a count as well?
eg: =SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1), counta(Sheet1!J2:J10)) - obvoiuosly my formula doest work, but just wanted to give you an idea of what I was looking for....thanks
 
Upvote 0
Hi,

=SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1),(Sheet1!J2:J10))

Ths is exactly what I needed, thanks...I have another query though, based on the first two confitions can I use this formula to do a count as well?
eg: =SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1), counta(Sheet1!J2:J10)) - obvoiuosly my formula doest work, but just wanted to give you an idea of what I was looking for....thanks

Your spec is ambiguous... It's probably one of the following:

=SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1))

=SUMPRODUCT(--(Sheet1!B2:B10=Sheet2!B3),--(Sheet1!E2:E10<>Sheet2!A1),--ISNUMBER(Sheet1!J2:J10))

Or, elaborate a bit more...
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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