Add to a formula

M

MAX

hello
I have this formula

=IF(L43=0,0,IF(L43=1,1,IF(OR(L43=7,L43=8),8,IF(L43=9,13,IF(L43=5,5,IF(L43=2,2,IF(L43=6,6,)))))))
and I want to add that when L43=7.5 it comes an output of 7.5, any help.
Thanks in advance.
 
H

Harlan Grove

MAX said:
=IF(L43=0,0,IF(L43=1,1,IF(OR(L43=7,L43=8),8,IF(L43=9,13,IF(L43=5,5,IF(L43=2,2,IF(L43=6,6,)))))))
and I want to add that when L43=7.5 it comes an output of 7.5, any help.
....

So you want the formula to return 0 when L43 doesn't equal any of the
given values?

One way,

=IF(OR(L43={0;1;2;5;6;7;7.5;8;9}),
LOOKUP(L43,{0;1;2;5;6;7;7.5;8;9},{0;1;2;5;6;8;7.5;8;13}),0)

It's generally best to use LOOKUP functions for this sort of thing.
 
R

Rajesh Mehmi

Hi Max

IMHO Nested If's are restricted to 7 maximum

Creat a list and vlookup the values

=VLOOKUP(L43,F5:G13,2,FALSE)

Columns

F G

0 0

1 1

2 2

5 5

6 6

7 8

7.5 7.5

8 8

9 13

Best Regards

Rajesh Mehmi

(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top