4 different if statements, not working

B

Brian

I have tried the *if between statements but that gives me a value error.

=(IF(A21="P1","1p",A21),(A21="p2","2p",A21),(A21="p3","3p",A21),(A21="p4","4p",A21))

how am I supposed to link these up?

Thanks
Brian
 
D

Don Guillett

You can nest as shown here with an extra ) for each if
=IF(A21="p1","1p",IF(A21="p2","2p",A21))
or you could use LOOKUP
 
T

tjtjjtjt

Brian said:
I have tried the *if between statements but that gives me a value error.

=(IF(A21="P1","1p",A21),(A21="p2","2p",A21),(A21="p3","3p",A21),(A21="p4","4p",A21))

how am I supposed to link these up?

Thanks
Brian
 
B

Brian

Hello and thank you for your response.
I tried to add an extra ) but it is not working. Am I doing something wrong?
I can't use a lookup for this.

=IF(A21="p1","1p",IF(A21="p2","2p",A21,if(a21="p3","3p",if(a21="p4","4p",a21))))

Thanks Brian
 
B

Brian

Cancel that last post (except for the thank you part)
I got it, I missed the A21 in the mix.

Thanks again
brian
 

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