Thanks:  0
Likes:  0

# Thread: IF equation

1. 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. 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. On 2002-04-02 07:52, Macker72 wrote:
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
The condition of the first IF needs rewriting:

=IF(AND(D2>=0.8,D2<=1),D2*10,IF(D2>1,D2*100,IF(D2<0.8,D2*1000,"wrong")))

4. Thanks AJ! you got it!

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•