2

I have a long list of name with addresses and phone numbers in this format:

Barn Jeffery 123 Sunny Ln. Pulaski ,315-555-5555
Sarah 456 Bull Blvd. Memphis ,256-555-5555
Tara C. 7894 Pringle St. Clw. ,813-555-5555
Barnes Mathew 5821 Melody Ln. Tmp ,562-555-5555
Matthew 23B 189th St. Brooklyn ,718-555-5555
Castor Abby B. 7459 71st St. Stn ,210-555-5555
Karen 120 Tabby Trl. Seattle ,965-555-5555
Nick K. 4141 Fulton Ave. Missouri ,478-555-5555

What is the Find and Replace formula to add a comma before all the first names and/or a comma after all the last names?

0

4 Answers 4

1

Word takes accepts regular expressions in it's Find and Replace. There is a chart in here.

http://office.microsoft.com/en-us/word-help/find-and-replace-text-or-other-items-HA001230392.aspx

0

I would venture to say that there is no formula for something like that. There is no consistency and therefore no solution.

2
  • Isn't their a formula to at least add a comma before the first names? I've done it before and completely forgot how...Thx for taking the time to answer my question.
    – Stacey Y.
    Jul 6, 2011 at 22:33
  • No, not to my knowledge. I'm sorry.
    – imtheman
    Jul 6, 2011 at 23:44
0

If "add a comma before all the first names" means to add a comma at the beginning of each line, you can do this:

In the "find" column, paste this ^p and in the "replace" column, paste this ^p, then click "replace all" to carry out the replacement.

Finally you will need to add a comma at the first line and delete the comma at the last line manually.

Hope it helps.

1
  • Sorry but I didn't notice that this is a question asked about 2 years ago..
    – Paul Allen
    Apr 10, 2013 at 5:05
0

I'd recommend putting this in Excel and adding the commas there. Once in Excel, you can use the Text to columns wizard to split the names into separate columns (use the "delimted" method and check the box for "space").

Use CONCATENATE to add the commas (as shown in the screenshot below).

enter image description here

Copy the column containing the formulas (col B in the screenshot) then "Paste values" to keep just the text with the commas. Use CONCATENATE again in the next blank column to put it all back together and restore the spaces (screenshot below).

enter image description here

Keep in mind that this method will involve some manual cleanup on the names with middle initials.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .