Jason L. answered 08/04/23
=TRIM(MID(A1,FIND(",",A1)+2,1000))&"; "&LEFT(A1,FIND(",",A1)-1)
There's always more than one way to do things in Excel. This video shows one way. Please let me know if you have any questions.
David T.
asked 03/16/23In cell A1, it says "269 Southwest 13th Avenue, Pompano Beach, FL".
In cell A2, I want it to be reformatted to "Pompano Beach, FL; 269 Southwest 13th Avenue".
What formula would I use to reformat?
Jason L. answered 08/04/23
=TRIM(MID(A1,FIND(",",A1)+2,1000))&"; "&LEFT(A1,FIND(",",A1)-1)
There's always more than one way to do things in Excel. This video shows one way. Please let me know if you have any questions.
David L. answered 05/18/23
You can write custom worksheet functions in VBA. The function below will accomplish this task.
Joseph S. answered 03/18/23
Try this:
=MID(A1,SEARCH(",",A1) + 2,LEN(A1)) & ", " & LEFT(A1,SEARCH(",",A1)-1)
NOTE: This formula will work provided that the address is separated by a comma followed by a space AND it separates the strings to be reversed.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Joseph S.
Let’s explain what this formula does: The MID function will extract text from a given string (in this case the text in cell A1) at a location starting from a given character number in the string for a certain number of characters. The SEARCH function will search a given string and return the number of the character where it's located. If there is no such character it will return the #VALUE error. The LEN function will return the number of characters in a given string. The LEFT function will extract text starting at the first character in the string for a certain number of characters. The text in A1 is: "269 Southwest 13th Avenue, Pompano Beach, FL" The location where the text should be captured for the new cell is 2 characters past the comma (after the comma and the blank space). The first part of the formula looks at cell A1 text, finds the location of the comma, then starting at the character two spaces later returns the remaining text in the cell. (Note this is assured since whatever length is left will certainly be less the the length of the original text in A1.) Then the captured string is concatenated by adding a comma and a space. then the left most part of the original text up to the character just before the comma.03/18/23