Link to home
Start Free TrialLog in
Avatar of andrew garrard
andrew garrard

asked on

Nested if satements

How do i write a nested if statement for the following?

If greater than  14 but less than 16 return £10000
BUT If greater than  16 but less than 18 return £20000
AND if greater than 18 return £30000

I tried =IF(AND(C9>=14,C9<16),10000,0)
Which returns £10000 however when i try nest it, everything just returns #VALUE?


Thank you
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Try below:
=IF(AND(C9>=14,C9<16),10000,IF(AND(C9>=16,C9<18),20000,30000))

Open in new window

Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try
=INDEX({0;10000;20000;30000},MATCH(C9,{0;14;16;18}))

Open in new window

Regards
Shorter
=INDEX({0;1;2;3}*10^4,MATCH(C9,{0;14;16;18}))

Open in new window

SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If greater than  14 but less than 16 return £10000
BUT If greater than  16 but less than 18 return £20000
AND if greater than 18 return £30000
What about the following cases?
  • Less than or equal to 14
  • Equal to 16
  • Equal to 18


»bp
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 14 days, so it is now classified as abandoned.

If you feel this question should be closed differently, post an objection and a moderator will read all objections and then close it as they feel fit. If no one objects, this question will be closed automatically the way described above.