Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Wildcards in IF statement
I'm trying to use a IF statement to determine if a text of 4 characters
second digit is a 2 to say "Happy" else "Sad". Ex. if "0204" then "Happy", "Sad". I can't get the wildcard characters to work. -- Thank you, Ant |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Wildcards in IF statement
=IF(MID(F23,2,1)="2","Happy","Sad")
-- If this post helps click Yes --------------- Jacob Skaria "Ant" wrote: I'm trying to use a IF statement to determine if a text of 4 characters second digit is a 2 to say "Happy" else "Sad". Ex. if "0204" then "Happy", "Sad". I can't get the wildcard characters to work. -- Thank you, Ant |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Wildcards in IF statement
Try
=IF(MID(A1,2,1)="2","Happy","Sad") Mike "Ant" wrote: I'm trying to use a IF statement to determine if a text of 4 characters second digit is a 2 to say "Happy" else "Sad". Ex. if "0204" then "Happy", "Sad". I can't get the wildcard characters to work. -- Thank you, Ant |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Wildcards in IF statement
Yes this works. Thanks.
-- Thank you, Ant "Mike H" wrote: Try =IF(MID(A1,2,1)="2","Happy","Sad") Mike "Ant" wrote: I'm trying to use a IF statement to determine if a text of 4 characters second digit is a 2 to say "Happy" else "Sad". Ex. if "0204" then "Happy", "Sad". I can't get the wildcard characters to work. -- Thank you, Ant |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Wildcards in IF statement
This works and I think it would work better than me using =LEFT and OR
statements. -- Thank you, Ant "Jacob Skaria" wrote: =IF(MID(F23,2,1)="2","Happy","Sad") -- If this post helps click Yes --------------- Jacob Skaria "Ant" wrote: I'm trying to use a IF statement to determine if a text of 4 characters second digit is a 2 to say "Happy" else "Sad". Ex. if "0204" then "Happy", "Sad". I can't get the wildcard characters to work. -- Thank you, Ant |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Wildcards in IF statement
You could use Left() if you wished, and return the same results:
=IF(LEFT(RIGHT(A1,3))="2","Happy","Sad") -- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Ant" wrote in message ... This works and I think it would work better than me using =LEFT and OR statements. -- Thank you, Ant "Jacob Skaria" wrote: =IF(MID(F23,2,1)="2","Happy","Sad") -- If this post helps click Yes --------------- Jacob Skaria "Ant" wrote: I'm trying to use a IF statement to determine if a text of 4 characters second digit is a 2 to say "Happy" else "Sad". Ex. if "0204" then "Happy", "Sad". I can't get the wildcard characters to work. -- Thank you, Ant |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
use of wildcards | Excel Worksheet Functions | |||
Wildcards in RTD | Excel Discussion (Misc queries) | |||
Use wildcards | Excel Discussion (Misc queries) | |||
wildcards in vba | Excel Discussion (Misc queries) | |||
VBA Wildcards - HELP! | Charts and Charting in Excel |