Link to home
Start Free TrialLog in
Avatar of Computer Guy
Computer Guy

asked on

Reformat a field in Excel

Hi, In Excel, how can I make  BROOKS, GARTH to GARTH BROOKS magically?
Avatar of John
John
Flag of Canada image

Assuming you can create a sheet with just this information in it (say a column created as you showed above), save the sheet as a .CSV file and the inport it. The CSV import allows you to define colums by the comma, which is what you want here. Then copy the columns back to your main sheet.

.... Thinkpads_User
if A2 has the lastname,firstname, you can put this in B2 and copy down:

[B2] = TRIM(RIGHT(A2,LEN(A2)-FIND(",",A2))) & " " &LEFT(A2,FIND(",",A2)-1)

This assumes that you may or may not have a space after the comma.

See attached.

Dave
example-r1.xls
Avatar of Computer Guy
Computer Guy

ASKER

Hi,

Thanks, I tried it and it works fine on the ones that are setup that way.

Now when I say have ALABAMA, this shows up in the field: #VALUE!

How can I do this automatically without having to change it manually?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of dlmille
dlmille
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial