Forum Home
Press F1
 
Thread ID: 145435 2017-11-01 18:58:00 Excel formula help Tony (4941) Press F1
Post ID Timestamp Content User
1441487 2017-11-01 18:58:00 This has got to be so obvious but it is so long since I did any Excel that I've forgotten cdn.pressf1.pcworld.co.nz
What I want is the formula to say "If $A2 has a value between 10 and 50, make $B2 increase by 10%, otherwise increase by 5%".

Easy, eh?
Tony (4941)
1441488 2017-11-01 19:08:00 Don't bother - I've solved it. Tony (4941)
1441489 2017-11-01 21:38:00 Bugger, finally an Excel question I could have answered and it's too late :p
for the record my solution =$B2*IF($A2-10<41, 1.1, 1.05)
dugimodo (138)
1441490 2017-11-02 01:58:00 well in psuedo

if x is greater than 10 and less than or equal to 50 then x increases by 10% else x increases by 5%

dugimodo, your logic is flawed since anything below 41 will be right including values less than 10 (negatives included) but I'm sure you can correct it.
Kame (312)
1441491 2017-11-02 03:10:00 I assumed positive values, but yeah doesn't work from 0-10 either. I was trying to find the simplest solution and made it too simple.
I enjoy these though and always get there in the end. I use quite a few formulas at work for various things.

So just for the challenge of it - this one works
=$B2*IF($A2<10, 1.05, IF($A2>50, 1.05, 1.1))
dugimodo (138)
1441492 2017-11-02 03:38:00 Excel isn't my favourite language but I would do something like:

=$B2 * IF(AND($A2 > 9, $A2 < 51), 1.1, 1.05)

Didn't pick up the within range so 10 inclusive
Kame (312)
1441493 2017-11-03 02:19:00 Excel isn't my favourite language but I would do something like:

=$B2 * IF(AND($A2 > 9, $A2 < 51), 1.1, 1.05)

Didn't pick up the within range so 10 inclusive

:thumbs: Exactly what I came up with.
Tony (4941)
1