Baldrick
Baldrick

Reputation: 11012

Excel Formula - Yeah thats right, I said excel?

If A1 contains 0.3 I want B1 to say 1

If A1 says0.45 I want B1 to say 0

If it's anything in-between 0.3 and 0.45 I want it to say the proportional difference, so if A1 said 0.375, B1 should say 0.5 as its half way between 0.3 and 0.45.

Is is even possible? I'm thinking nested IFs but I can't see how to actually get there?

Upvotes: 2

Views: 225

Answers (4)

Lady Buger
Lady Buger

Reputation: 11

this seem to work and looks easy.In B1
=(0.45-A1/0.15)+2.55

Upvotes: 1

joshb
joshb

Reputation: 5220

=IF(AND(A1 >= 0.3, A1 <= 0.45), ((0.45-A1)/(0.45-0.3)), "out of range")

Upvotes: 3

UnhandledExcepSean
UnhandledExcepSean

Reputation: 12804

This?
=IF(A1=0.3,1,IF(A1=0.45,0,((0.45-A1)/0.15)))

Upvotes: 2

phoog
phoog

Reputation: 43056

you could try this: =(0.45-A1)/(0.45-0.3)

Simplified: =(0.45-A1)/0.15

Another alternative: =3-A1/0.15

Upvotes: 7

Related Questions