Can Excel do nested IF Statements if something is true, and something else if the first IF statement is false?
For instance, in plain english,
If the cell contains "(" Then have it display as "X" if Cell contains ", ", or as "Y" if Cell Contains "," (no space)
If cell doesn't contain "(" Then have it display as "Z"
For instance Lets say A1 contains either "Jones, Rick S (NonEmp)" , "Jones,Rick S (NonEmp), or as "Jones, Rick S"
Then:
X = Rick S Jones (NonEmp)
Y = Rick S Jones (NonEmp)
Z = Rick S Jones
Basically I want to take the Name flip it, remove the comma, and append what is in the parenthesis to the end of the string.
I started another thread which solved some problems, but it was starting to get confusing, so I figured since this is a somewhat different issue I should start a new thread.
Here is my code.
This code works if A1 contains either "Jones, Rick S (NonEmp)" or "Jones, Rick S"![]()
Please Login or Register to view this content.
It will not work with "Jones,Rick S (NonEmp)" or if there is no space between the Middle initial and "(".
I want it to function like this basically...
Pseudocode:
if that is too complicated, I at least want to account for spaces after the comma and no spaces after if possible.![]()
Please Login or Register to view this content.
Also I don't need help with getting it to display properly, only with the IF functions and getting them to process correctly, which allows the functions to know how to alter the string to display it uniformly.
Bookmarks