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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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)
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,220,987
Messages
6,157,239
Members
451,407
Latest member
vdaesety

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