# Either of 4 cells equals a value then get the desired result

#### hsandeep

##### Well-known Member
How to formulate:

IF EITHER of B2 or D2 or F2 or G2 is EQUAL TO 1 THEN I2=100 ELSE “”

I am using Excel 2007.
Sheet1

 B C D E F G H I 2 1 1 1 1 100

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 33px"><col style="WIDTH: 33px"><col style="WIDTH: 33px"><col style="WIDTH: 33px"><col style="WIDTH: 33px"><col style="WIDTH: 33px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"></colgroup><tbody>
</tbody>

### Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

#### stumac

##### Active Member
If C2 & E2 never contain 1 then you could use countif, if they can then use OR.

Code:
``=IF(OR(B2=1,D2=1,F2=1,G2=1),100,"")``

Last edited:

#### hsandeep

##### Well-known Member
If C2 & E2 never contain 1 then you could use countif, if they can then use OR.

Code:
``=IF(OR(B2=1,D2=1,F2=1,G2=1),100,"")``
Thanks stumac. IT WORKS

Replies
1
Views
106
Replies
8
Views
293
Replies
5
Views
438
Replies
13
Views
628
Replies
10
Views
287

1,133,270
Messages
5,657,749
Members
418,411
Latest member
Excellency

### 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.

### Which adblocker are you using?

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

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