![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
F2=104 but I cannot get this to work? =IF(F2<73,"Class I",IF(F2>73<100,"Class II",IF(F2>100<200,"Class III")))
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Quote:
=IF(F2<73,"Class I",IF(F2<100,"Class II",IF(F2<200,"Class III"))) Hope this helps, Russell [ This Message was edited by: Russell Hauf on 2002-03-11 12:27 ] [ This Message was edited by: Russell Hauf on 2002-03-11 12:27 ] |
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
This will classify F2=0 as Class I. If that's not desired, use or =IF(F2,IF(F2<73,"Class I",IF(F2<100,"Class II",IF(F2<200,"Class III","?"))),"") Both formulas will produce a question mark if F2 >= 200. [ This Message was edited by: Aladin Akyurek on 2002-03-11 13:02 ] |
|
|
|
|
|
|
#4 | |
|
Guest
Posts: n/a
|
Quote:
=iF(F2<73,"Class I",IF(F2<100,"Class II",IF(F2<200,"Class III"))) |
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=IF(F2>0,VLOOKUP(F2,{0,"Class I";73,"Class II";100,"Class III";200,"?"},2),"") |
|
|
|
|
|
|
#6 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
Russell - I get an error message with that formula??
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
Anonymous - if the number is 200 it returns Class II because it is greater than 100. I think you need the OR or AND included.
[ This Message was edited by: dneas on 2002-03-11 12:55 ] |
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#9 | |||
|
New Member
Join Date: Mar 2002
Posts: 48
|
Quote:
Quote:
=iF(F2<73,"Class I",IF(F2<100,"Class II",IF(F2<=200,"Class III"))). If statements are progressive, meaning it first checks if F2 is less than 73, if not, it then checks if F2 is less than 100, but it already knows its greater than 73 because this was already checked. It then checks if F2 is less than or equal to 200, knowing that it is greater than 200. You should also think about putting another else at the end, in the case that F2 is greater than 200. |
|||
|
|
|
|
|
#10 |
|
New Member
Join Date: Mar 2002
Posts: 48
|
I meant if you want "Class III", not Class II like I wrote
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|