# the greater than and less than if statement

#### darkwarrior

##### New Member
HI guys I am new here so here goes, if i wanted to use the if statement to indicate if a column is greater than another columnsay by 10 show 'yes' and if it is less than 10 show 'no' how would i do this?

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
=IF(A1+10>A2,"Yes","No")

Thanx!! really appreciate this great.

I however made a tiny mistake...i should have included the or equal to statement ..so here i go again 'if the number is greater than or equal to 10 show yes if the number is less than or equal to show no..sorry for the mix up and thanks for any additional help!!

May be this:

=if(A1>=10,"Yes","NO"))

I must be sleeping when I had another if. lol. Sorry

Hey Thanks Man !! that hits the nail on the proverbial head!! that worked remarkably well !! thanks a million!.

a7n9 said:
May be this:

=if(A1>=10,"Yes",if(A1<=10,"NO"))

No need for the second IF

=IF(A1>=10,"Yes","No")

You really shouldn't have equal to in both parts, you can't do both if it is equal.

So if you wanted YES if it was greater than or equal to 10, and NO if not:

=IF(A1>=10,"Yes","No")

Well hotpepper, it did work even with the double closed brackets!

It works because the first condition was met, but you don't need it.

Replies
2
Views
591
Replies
5
Views
654
Replies
1
Views
173
Replies
6
Views
1K
Replies
2
Views
1K

1,202,987
Messages
6,052,937
Members
444,616
Latest member
novit19089

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