between - function?

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

Guest

Hi,

I was wondering whether is there an option (Excel 2002) to make between
function. I mean that cell A1 is my variable. Now, by using IF I would like
to say that if A1 is more than 3 and less than 7 then "ok" - other values
should give "not ok". So I wrote =if(3<A1<7;"ok";"not ok") and it doesn't
work :-( Why?

Thanks, lucas
 
Hi,

I was wondering whether is there an option (Excel 2002) to make between
function. I mean that cell A1 is my variable. Now, by using IF I would like
to say that if A1 is more than 3 and less than 7 then "ok" - other values
should give "not ok". So I wrote =if(3<A1<7;"ok";"not ok") and it doesn't
work :-( Why?

Thanks, lucas

Because you're using the wrong structure for an If statement. Try

=IF(AND(A1>3,A1<7),"ok","not ok")

Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
Are you using this function for a custom data validation? If so, instead of
choosing Custom, choose "Decimal" or "Whole Number" from the "Allow" box and
enter your min and max values that way.

Otherwise if this formula is just looking to outout "ok" or "not ok" in a
cell, update your formula to this:

=IF(AND(A1>3,A1<7),"ok","not ok")
 
Guys,

Thx for all replies. Formula works.

BTW, there are 2 amazing things:
1) how helpful & willing to be helpful other (vel you) are,
2) how smart Excel is (is there anything one cannot do there?) :-)

Again thanks, lucas
 

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