Formulas

Occasional Visitor

Hi, I do a lot of name badges. People send me the list with the names to print on them. Issue is that some have "First Name" and others have "First & Last Name".

If its only one name it needs to be in UPPER case.  If two names then it is to be in Proper Case.

Is there a formula i can use so when i copy the list of names and paste them into a column in excel, i can have another column look in the name column and if it contains 1 or 2 names, it returns values in a column in either UPPER or Proper Case.

 

Maybe if the name column contains a space and then additional text or something it will be considered 2 names.   Thanks Daniel

1 Reply
Suppose the name is in cell A2:
=IF(LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))=0,UPPER(TRIM(A2)),PROPER(TRIM(A2)))
I added the TRIM functions to avoid issues with leading and trailing space characters.