If Formula using Greater than / Less than

  • Thread starter Thread starter crmulle
  • Start date Start date
C

crmulle

My formula is listed below. I would like the formula to look at cell f2 and
determine if it >=3 than 1 said:
=12 than 4. The formula is not working and I know it has something to do
with my logical test but i am not able to figure it out...any help would be
appreciated.

=IF(F2<=3,1,IF(F2>3<=6,2,IF(F2>6<=9,3,4)))

Carolyn
 
Hi Carolyn,

The previous post will work fine but infact there is no need to use the AND
function at all.

Try: =IF(F2<=3,1,IF(F2<=6,2,IF(F2<=9,3,4)))

Now this will return a value of 1 for all blank (or empty cells), to avoid
this use:

=IF(ISBLANK(F2),"",IF(F2<=3,1,IF(F2<=6,2,IF(F2<=9,3,4))))

Good look.

Danny
 
Thank you!

Dan R said:
Hi Carolyn,

The previous post will work fine but infact there is no need to use the AND
function at all.

Try: =IF(F2<=3,1,IF(F2<=6,2,IF(F2<=9,3,4)))

Now this will return a value of 1 for all blank (or empty cells), to avoid
this use:

=IF(ISBLANK(F2),"",IF(F2<=3,1,IF(F2<=6,2,IF(F2<=9,3,4))))

Good look.

Danny
 
Thank you.

David Biddulph said:
But you don't need to test for F2>3 when you've already taken out those
where F2<=3, and you don't need to test for F2>6 when you've already taken
out those where F2<=6.
=IF(F2<=3,1,IF(AND(F2>3,F2<=6),2,IF(AND(F2>6,F2<=9),3,4))) can be simplified
to
=IF(F2<=3,1,IF(F2<=6,2,IF(F2<=9,3,4)))
 

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