# Another simple formula question

#### hoff123

##### Board Regular
Hi All,

Im trying to write a simple IF formula but I cant find out how to do it using Excel help.

This is what I am after:

IF H2 > 1 and IF I2 > 1, "Yes", "No"

Obviously the AND work wont the formula, how do I make this work?

Thanks

### Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try:

=IF(AND(H2>1,I2>1),"Yes","No")

HTH.

=IF(AND(H2>1,I2>1),"Yes","No")

Question: How many statements can I have inside one IF/AND formula?

I am trying to run about 18

E.G. IF(AND(E#=""1"",G#="1",J#="1",N#="1",P#="1",S#="1",U#="1",W#="1",Y#="1",AC#="1",AE#="1",AH#="1",AJ#="1",AL#="1",AN#="1",AP#="1",AR#="1",AT#="1")),"1","0")

Hi,

Within AND, you can have 30.

If you do like this:

=IF((A1=1)*(A2=1)*(A3=1)*(A4=1),"YES","No")

as many as you like.

Assuming:
- Your condition is always Cell = 1
- The cells you are checking are grouped together.

It appears as though you could use:

If(Sum(A#:AY#)=NumberOfCriteria,"Yes","No")

Replies
3
Views
180
Replies
2
Views
152
Replies
6
Views
209
Replies
26
Views
845
Replies
7
Views
270

1,221,185
Messages
6,158,409
Members
451,490
Latest member
desktopace

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

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