IF Function Question

LindaDuhe

New Member
Joined
May 22, 2007
Messages
9
I have a column with numbers in it. Each of these numbers I want to logically test to the following statement:
IF > 21 AND < 180 THEN YES otherwise NO for example. So in other words I want to know if the number in my column is between 21 and 180. I know I have to use an IF statement but I do not know how to combine the 2 conditions into one formula.

Can anyone help? Thanks in advance!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Use IF and AND. Let's say you are testing the value in cell A1, then use:

=IF(AND(A1>21,A1<180),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,222,038
Messages
6,163,549
Members
451,843
Latest member
vitto

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