Convert Range into Set for CSE use

Trojan35

New Member
Joined
Dec 9, 2005
Messages
2
Hi, I need to do this formula:

=SUM(IF((A1:A100={1,59,303}), B1:B100, 0))

but I need to use cells D1:D3 instead of {1,59,303}. I know i could make one long formula but given that i'll need to use different ranges (say, F3:F37) for many different formulas, that is not practical.

Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
Trojan35 said:
Hi, I need to do this formula:

=SUM(IF((A1:A100={1,59,303}), B1:B100, 0))

but I need to use cells D1:D3 instead of {1,59,303}. I know i could make one long formula but given that i'll need to use different ranges (say, F3:F37) for many different formulas, that is not practical.

Thanks.

Maybe this will help,

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A10,F1:F3,0))),B1:B10)

Where F1:F3 house your criterias.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,546
Messages
5,838,011
Members
430,526
Latest member
NiceGuyWithExcel2007

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
Top