How do I combine If and AND Formula

  • Thread starter Thread starter Nicole
  • Start date Start date
N

Nicole

I want to use a IF Formula but need to combine it with an AND Formula as I am
trying to check if the value of a cell is between two values...in my case If
cell is between 12 and 24 show "X".

I came so far as =If(A1>=12;"X";"") so now I need to get it also to check if
A1 is smaller than 24. How can I do that?

Regards

Nicole
 
Use the AND function

=IF(AND(A1>=12,A1<24),"X","") or perhaps you meant
=IF(AND(A1>=12,A1<=24),"X","")
Tyro
 
Use the AND function
=IF(AND(A1>=12,A1<24),"X","") or perhaps you meant
=IF(AND(A1>=12,A1<=24),"X","")

If she meant the latter one, it's possible to have a formula without even
using the AND function...

=IF(ABS(A1-18)<=6,"X","")

Rick
 
Obfuscation is a grand thing. I remember when we wrote entire C programs on
one line. Let's keep it simple
Tyro
 
<<<"Let's keep it simple">>>

Why?

Don't forget ... these groups are not just for the OPs.
They're part of an educational process for anyone interested in XL,
plus they add to the archives.

Once the OPs have their uncomplicated, lucid suggestions, what comes beyond
that can be enjoyable and entertaining, not to mention didactic, and
pedagogical to the "more informed".

--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------


Obfuscation is a grand thing. I remember when we wrote entire C programs on
one line. Let's keep it simple
Tyro
 
Back
Top