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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,214,123
Messages
6,117,861
Members
448,782
Latest member
lepaulek

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