Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Excel question?

Is there a way to format raw data like:

Lucroy, Jonathan C - MIL

->

Jonathan Lucroy C - MIL

Is there an easy way in excel to do this?

4 Answers

Relevance
  • Anonymous
    7 years ago
    Favorite Answer

    use filter to sort data..

    simply select the row and apply filter.. and sort accordingly..

  • 7 years ago

    That's tricky, and the GIGO rule (garbage in=garbage out) will be in full effect, so I don't think it is advisable. (I'm thinking of some fairly complicated functions that would do that. It would probably take 30 minutes to set up and would only work some of the time (anyone who has a name that doesn't quite fit the format you mentioned, ie, Jr., may cause an error.)

    If that list is only a thousand or so names long, you could probably print it and re-type it faster than you could get excel to fix it for you. (And if you got excel to fix it you would still need to proofread the excel results and fix those.)

    If you really don't want to re-type or if this is for an excel class, go to help on functions, the find or search functions can tell you where in the text string the comma is, and you can use other text functions (like LEFT) to re-arrange the cell.

  • 7 years ago

    So you just want to put the First name first and take out the comma. I assume you have lots of names. I don't know if you want the results in separate columns - a good idea - or just one column.

    The good thing is there is a consistent separator, a space.

    Use 'text to columns' with space as the separator. This will put each word in separate columns.

    Use find and replace, comma with nothing, to remove all commas.

    Now how to leave it, separate columns is best but if you want it in one, use =B2&" "&A2&" "&C2. This will put it in the order you have specified with spaces between words.

  • ?
    Lv 5
    7 years ago

    This formula should work:

    =MID($A1, FIND(",", $A1) + 2, FIND(" ", $A1, FIND(",", $A1) + 2) - FIND(",", $A1) - 1) & LEFT($A1, FIND(",", $A1) - 1) & RIGHT($A1, LEN($A1) - FIND(" ", $A1, FIND(",", $A1) + 2) +1)

    As stated by wayfaroutthere, this would have very limited use as conditions (number of spaces and comma, etc) would have to be exactly as your example. If anything, it makes for a fun exercise in the use of various text functions (MID, LEFT, RIGHT, FIND, LEN).

Still have questions? Get your answers by asking now.