![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Mar 2002
Posts: 107
|
Hi
Why does the following equation always return "wrong": =IF(0.8>D2<1,D2*10,IF(D2>1,D2*100,IF(D2<0.8,D2*1000,"wrong"))) when cell D2 contains the figure 0.9? Many thanks for your help. Macker |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
I think it's the way you're expressing the first part of the formula that is causing you the problem.
Instead of 0.8>D2<1, replace it with the following... AND(D2>0.8,D2<1) (Assuming you mean that D2 should be in between 0.8 and 1) Rgds AJ |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
|
Quote:
=IF(AND(D2>=0.8,D2<=1),D2*10,IF(D2>1,D2*100,IF(D2<0.8,D2*1000,"wrong"))) |
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Posts: 107
|
Thanks AJ! you got it!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|