Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF OR/AND help in Excel formula 3

Status
Not open for further replies.

utahjzz98

Programmer
Jan 9, 2003
69
US
I have a column that has values between 1-10 and I am attempting to use a nested IF statement to generate a value based on that number range. If the number is >= 8, it should be "1 - High", <= 3, it should be "3 - Low", and finally > 3 AND < 8 should be "2 - Medium". Here is what I am attempting use: =IF(G4>=8, "1 - High", IF(G4<=3, "3 - Low", IF(AND(G4>3, G4 <8), "2 - Medium"))). The high and the low portion work, but I can't get medium to show up properly. Any help would be appreciated.
 
hi,

The "AND" condition is really the remaining ELSE...
[tt]
=IF(G4>=8,"1 - High",IF(G4<=3, "3 - Low","2 - Medium"))
[/tt]

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
=IF(g4>=8,"1 - High",IF(G4<=3, "3 - Low","2 - Medium"))

If it's not low or high then it must be medium, right?
 
(1) It works for me, on Excel 2010, if I simply cut&paste it from your post.
(2) What do you actually get when "medium" does not "show up properly"? A blank? An out-of-office message?
(3) Do you realise that your third IF is not required? It (still) works fine for =IF(G4>=8, "1 - High", IF(G4<=3, "3 - Low", "2 - Medium")). Apply KISS principle wherever possible.
 
Wow! And mine was not even in "mint" condition! ;-)

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
So what, apart from prolixity, was wrong with the original form of the formula?
 
@Deniall, thanx for a great Word-of-the-day! You are so right. I did not even bother to look at the veracity of the third IF, in my myopic quest.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top