In 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?
In 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?
This approach uses the LEFT and RIGHT functions to find the two text strings. TRIM removes any trailing and following white spaces.
=TRIM( RIGHT(A1,LEN(A1)-FIND(",",A1)) & ";" & " " &
LEFT(A1,FIND(",",A1)-1) )
This approach uses TEXTSPLIT to separate the string based on commas, then uses INDEX to select the component parts for joining with &
. TRIM removes any trailing and following white spaces.
=TRIM( INDEX(TEXTSPLIT(A1, ","),, 2) & ", " &
INDEX(TEXTSPLIT(A1, ","),, 3) & "; " &
INDEX(TEXTSPLIT(A1, ","),, 1) )
Assuming no version constraints based on your tags:
=TRIM(TEXTJOIN("; ",,TEXTAFTER(A1,","),TEXTBEFORE(A1,",")))