Using IF Function where logical test is for range

Jazzmann

New Member
Joined
Aug 10, 2009
Messages
16
Greetings, I having issues with a formula the finds a name in a range.

=IF(F10:F600="Bob",SUMPRODUCT((A10:A600="NOT SENT")*B10:B600),"")

I keep getting #value error.

Any help would be appreciated

Thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi,

I think you mean this, use J1 formula if you don't mind 0 (zero) when there's no match for "Bob" and "Not Sent", if that's an issue, use K1 formula:


Book1
JK
10 
Sheet344
Cell Formulas
RangeFormula
J1=SUMPRODUCT((F10:F600="Bob")*(A10:A600="NOT SENT")*B10:B600)
K1=IFERROR(1/(1/SUMPRODUCT((F10:F600="Bob")*(A10:A600="NOT SENT")*B10:B600)),"")
 
Upvote 0
Thanks jtakw for your response. This might make it a little more understandable. The A10:A600="NOT SENT" should have been <>

ABC
1BobDone$25.00
2TomSent$15.00
3BobWon$15.00
4KimSent$25.00
5JaneBilled$35.00
If A1:A5 = Bob
and B1:B5 = Won or Billed
then Sum C1:C5

<colgroup><col style="mso-width-source:userset;mso-width-alt:987;width:20pt" width="27"> <col style="width:49pt" width="65" span="4"> </colgroup><tbody>
</tbody>
 
Upvote 0
I having issues with a formula the finds a name in a range.

=IF(F10:F600="Bob",SUMPRODUCT((A10:A600="NOT SENT")*B10:B600),"")

Thanks jtakw for your response. This might make it a little more understandable. The A10:A600="NOT SENT" should have been <>

Well, that's Not how you show it in OP, just change the = to <> , use either E1 or F1 formula

Or, if Only Won or Billed is to be included, use either E2 or F2 formula:


Book1
ABCDEF
1BobDone$25.004040
2TomSent$15.001515
3BobWon$15.00
4BobSent$99.00
5KimSent$25.00
6JaneBilled$35.00
Sheet344
Cell Formulas
RangeFormula
E1=SUMPRODUCT((A1:A6="Bob")*(B1:B6<>"Sent")*C1:C6)
E2=SUMPRODUCT((A1:A6="Bob")*(B1:B6={"Won","Billed"})*C1:C6)
F1=IFERROR(1/(1/SUMPRODUCT((A1:A6="Bob")*(B1:B6<>"Sent")*C1:C6)),"")
F2=IFERROR(1/(1/SUMPRODUCT((A1:A6="Bob")*(B1:B6={"Won","Billed"})*C1:C6)),"")


EDIT: Additional options.
 
Last edited:
Upvote 0
Actually, you don't even need SUMPRODUCT, SUMIFS will work fine (unless your Excel is pre-2007):


Book1
ABCDHI
1BobDone$25.004040
2TomSent$15.001515
3BobWon$15.00
4BobSent$99.00
5KimSent$25.00
6JaneBilled$35.00
Sheet344
Cell Formulas
RangeFormula
H1=SUMIFS(C1:C6,A1:A6,"Bob",B1:B6,"<>Sent")
H2=SUM(SUMIFS(C1:C6,A1:A6,"Bob",B1:B6,{"Won","Billed"}))
I1=IFERROR(1/(1/SUMIFS(C1:C6,A1:A6,"Bob",B1:B6,"<>Sent")),"")
I2=IFERROR(1/(1/SUM(SUMIFS(C1:C6,A1:A6,"Bob",B1:B6,{"Won","Billed"}))),"")
 
Upvote 0
Thanks jtakw, E1 worked great. I'm going to play around with the others to see what I can come up with. Thanks again
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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