Hi,

I have a dataset which has a bunch of names in columns - Lastname and First name. As the file that I have got has come from different people, the format they used is inconsistent. The format I need for my purpose is LASTNAME, Firstname (note the case )

However, the file I have received has got the Firstname where the lastname should be and the case used is camelcase. Since I have a list of about 1000 names, is there a way to use PQ Text functions to fix this?

Hopefully, the image below should provide a bit of clarity. I have used names that can be easily identified

What I have

Business Unit Column1 Column 2
Unit 1 SIMPSON Homer
Unit 1 FLANDERS Ned
Unit 1 Bart Simpson
Unit 2 SIMPSON Marge
Unit 2 Lisa Simpson
Unit 2 Maggie Simpson
Unit 3 FLANDERS Todd
Unit 3 FLANDERS Rod


Expected Output

Business Unit Column1
Unit 1 SIMPSON, Homer
Unit 1 FLANDERS, Ned
Unit 1 SIMPSON, Bart
Unit 2 SIMPSON, Marge
Unit 2 SIMPSON, Lisa
Unit 2 SIMPSON, Maggie
Unit 3 FLANDERS, Todd
Unit 3 FLANDERS, Rodd


Any help would be much appreciated!

Thanks