Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to create a formula that will do this: =IF(A1="G",print g,) or =IF(A1="J", print j,) =If(A1 = anything other than 'G' or 'J', print 'ERROR") Will someone help me with this. I am drawing a blank... Thank you. Yovation |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not sure about what you want with the 'print g' and 'print j' syntax,
but try this. =IF(NOT(OR(A1={"G","J"})),"print ERROR",IF(A1="G","print g","print j")) HTH, Paul -- "yovation" wrote in message oups.com... Hi, I'm trying to create a formula that will do this: =IF(A1="G",print g,) or =IF(A1="J", print j,) =If(A1 = anything other than 'G' or 'J', print 'ERROR") Will someone help me with this. I am drawing a blank... Thank you. Yovation |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=IF(A1="G",g,IF(A1="J",j,"ERROR"))
this presupposes that g and j are defined to be something, otherwise you'll just get a #NAME? error Brian Herbert Withun |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Some options:
=IF(A1="G","G",IF(A1="J", "J","ERROR")) =IF(A1="G",A1,IF(A1="J", A1,"ERROR")) =IF(OR(A1="G",A1="J"), A1,"ERROR") Regards Trevor "yovation" wrote in message oups.com... Hi, I'm trying to create a formula that will do this: =IF(A1="G",print g,) or =IF(A1="J", print j,) =If(A1 = anything other than 'G' or 'J', print 'ERROR") Will someone help me with this. I am drawing a blank... Thank you. Yovation |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
=IF(OR(EXACT(A1,{"G","J"})),LOWER(A1),"ERROR") Or, if case doesn't matter: =IF(OR(A1={"G","J"}),A1,"ERROR") In article .com, yovation wrote: Hi, I'm trying to create a formula that will do this: =IF(A1="G",print g,) or =IF(A1="J", print j,) =If(A1 = anything other than 'G' or 'J', print 'ERROR") Will someone help me with this. I am drawing a blank... Thank you. Yovation |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you.
=IF(A1="G","G",IF(A1="J", "J","ERROR")) works great. David |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome. Thanks for the feedback
Regards Trevor "yovation" wrote in message ps.com... Thank you. =IF(A1="G","G",IF(A1="J", "J","ERROR")) works great. David |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=IF(A1="G","Print g",IF(A1="J","Print j","Print 'ERROR"))
"yovation" wrote: Hi, I'm trying to create a formula that will do this: =IF(A1="G",print g,) or =IF(A1="J", print j,) =If(A1 = anything other than 'G' or 'J', print 'ERROR") Will someone help me with this. I am drawing a blank... Thank you. Yovation |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|