![]() |
![]() |
|
|||||||
| 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
Location: Surfers Paradise
Posts: 19
|
Whats wrong withthe following formula,
=IF(A32="Door Panel",IF(B32<0>1200,2,IF(B32<1200>1600,3,IF(B32<1600>2100,4,IF(B32>2100,5,0))))) What I'm trying to do is,the cell A32 has "Door Panel" in it and the sell B32 is less than 1200 insert 2 however if the sell B32 is greater than 1200 and less than 1600 then insert 3 and so on then if none of the criteria match insert 0. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Victoria, Australia
Posts: 761
|
Try
=IF(A32="Door Panel",IF(B32<1200,2,IF(B32<1600,3,IF(B32<2100,4,IF(B32>=2100,5)))),0) HTH Richard |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Your syntax needs correcting ... your formula should read as follows: =IF(A32="Door Panel",IF(B32<=1200,2,IF(AND(B32>1200,B32<=1600),3,IF(AND(B32>1600,B32<2100),4,IF(B32>=2100,5,0))))) I took the liberty of assuming that you mean if B32 is <=1200, and so on I hope this is what you want ... please post if it works for you, otherwise explain a little further what you are trying to accomplish!
__________________
Regards! Yogi Anand, D.Eng, P.E. Energy Efficient Building Network LLC www.energyefficientbuild.com |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
My apologies ... Richard had alredy posted not only the right syntax, but he had also removed the unnecessary baggage of using 'and' statements, meaning he had also corrected the logic. Way to go Richard!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|