A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Replace "," with nothing (ctrl/H)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have imported addresses into an excel spreadsheet and unfortunately it has kept the commas and fullstops at the end of each line of address. Is there a formula that I can use to remove these extra unwanted characters??
Thanks
Michelle
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Replace "," with nothing (ctrl/H)
Answer accepted by question author
To remove ALL of the commas and full stops, you can use Find/Replace
To remove commas and full stops if, and only if, they occur at the end of the string, you will need a formula or a macro.
For example, in an adjacent column, with your string in A1:
=IF(OR(RIGHT(TRIM(A1),1)={",","."}),LEFT(TRIM(A1),LEN(TRIM(A1))-1),TRIM(A1))
Fill down as far as required. Then Copy | Paste Special/Values to get rid of the formulas.
If that doesn't work, there may be nbsp's at the end of the string, and you may have to also remove them.
Answer accepted by question author
We examine the last character of each line and drop it if it is a comma or a space:
With address data in column A, in another column enter:
=IF(OR(RIGHT(A1,1)=",",RIGHT(A1,1)=" "),LEFT(A1,LEN(A1)-1),A1) and copy down
=SUBSTITUTE(A1,",","")