Multiple conditions question

andonny

Board Regular
Joined
Mar 11, 2002
Messages
220
Hi,
My problems are never ending.
I need to place the number 1 into cell H1 if any of the numbers below are in range A1:G1 and the same for the next row (A2:G2 --> H2) and so on until the last used row.

The numbers are 45,213,300,20,60,81,52

Thank you very much for your help
Andonny
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Ian Mac

MrExcel MVP
Joined
Feb 20, 2002
Messages
1,174
On 2002-09-25 05:17, andonny wrote:
Hi,
My problems are never ending.
I need to place the number 1 into cell H1 if any of the numbers below are in range A1:G1 and the same for the next row (A2:G2 --> H2) and so on until the last used row.

The numbers are 45,213,300,20,60,81,52

Thank you very much for your help
Andonny

Use:

=IF(SUMPRODUCT((A1:G1={45;213;300;20;60;81;52})*1),1,0)
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
On 2002-09-25 05:31, Ian Mac wrote:
Use:

=IF(SUMPRODUCT((A1:G1={45;213;300;20;60;81;52})*1),1,0)

Ian,

We can drop IF from it...

=SUMPRODUCT((A1:G1={45;213;300;20;60;81;52})+0)

Aladin
 
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,163,855
Messages
5,834,001
Members
430,250
Latest member
Reggie Mcqueen

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