Describe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to write a formula in which I want write that if any cell say A1=
between 4 to 20 and 24 to 30 then display "H" otherwise "Y". How should I
write.
Any shortcut would be grately obliged.

Thanks

Jai
 
One way:

=IF(OR(AND(A1>=4,A1<=20),AND(A1>=24,A1<=30)),"H","Y")

I assumed that by "between" you mean to include the endpoints of the
range. Otherwise, use > rather than >= and < rather than <=.
 
One possible way

=IF(A1="","",IF(AND(A1>=4,A1<=20),"H",IF(AND(A1>=24,A1<=30),"H","Y")))



--


Regards,


Peo Sjoblom
 
A1 cannot lie between (A and B) AND between (J and K);
It must lie between one pair of number OR the other
If you do not state your problem correctly in English then you have no
chance of getting Excel to solve it.

=IF(OR(AND(A1>=4,A1<=20),AND(A1>=24,A1<=30)),"H","Y")
Please tell me what mark I get for your homework!
best wishes
 
=IF(OR(AND(A1>4,A1<20),AND(A1>24,A1<30)),"H","Y")

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top