View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JR Hester JR Hester is offline
external usenet poster
 
Posts: 170
Default test text string for a comma (,)

Thanks for allowing me to post the problem. Finished teh post and searched
one more time, came up with teh ISERR and applied that. Worked great! here is
what I finally used
=IF(ISERR(RIGHT(A61,(LEN(A61)-FIND(",",A61)-1))&"
"&LEFT(A61,FIND(",",A61)-1)),A61,RIGHT(A61,(LEN(A61)-FIND(",",A61)-1))&"
"&LEFT(A61,FIND(",",A61)-1))

Where Col A contained a combination of "fname lname" and "lname, fname"
entries.
Maybe this will help someone else down the road!
"JR Hester" wrote:

Excel XP on WinXP

Inherited a spreadsheet from another user. Have a mixture of lname, fname
and fname lname combinations. I can successfully convert the lname, fname to
fname lname, teh problem is those cells that are already in the fname lname
return a #Value error.

I thought I could find a way to logically test the string for a comma(,) and
use an If statement to control my concatenate formula. I can't find a way to
test logically for the comma.

Can anyone offer a solution?

Thank you