ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   4 different if statements, not working (https://www.excelbanter.com/excel-worksheet-functions/7827-4-different-if-statements-not-working.html)

Brian

4 different if statements, not working
 
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

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

--
Don Guillett
SalesAid Software

"Brian" wrote in message
...
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","4
p",A21))

how am I supposed to link these up?

Thanks
Brian




tjtjjtjt



"Brian" wrote:

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


tjtjjtjt

I tried to Cancel that post and apparently hit the wrong button.

tj

"tjtjjtjt" wrote:



"Brian" wrote:

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


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

"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"Brian" wrote in message
...
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","4
p",A21))

how am I supposed to link these up?

Thanks
Brian





Brian

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

Thanks again
brian

"Brian" wrote:

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

"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"Brian" wrote in message
...
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","4
p",A21))

how am I supposed to link these up?

Thanks
Brian






All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com