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
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

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,201
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,331
Members
414,446
Latest member
CRAVIN

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