ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Remove Trailing Apostrophe (https://www.excelbanter.com/excel-discussion-misc-queries/153677-remove-trailing-apostrophe.html)

Dave P

Remove Trailing Apostrophe
 
I know how to remove leading apostrophes but I can't figure out how to remove
trailing apostrophes but still leave a number as text.

For example, I have a number like 018" in my spreadsheet. Of course, it is
actually " 018" when you go to edit the cell. I want to be able to remove
the " after the 8 but leave the cell as " 018.

My leading apostrophe macro doesn't work and if I use a find and replace
command, it removes both apostrophes and leaves me with 18 as the cell value.

What am I missing? Thanks

Pete_UK

Remove Trailing Apostrophe
 
Put this formula in a helper column:

=LEFT(A1,LEN(A1)-1)

and copy down the column. Then highlight all the cells with the
formula in, click <copy, then Edit | Paste Special | Values (check) |
OK, then <Enter. This will fix the values, so that you could delete
the original column of data you had.

Incidentally, although you refer to the symbol as an apostrophe ('),
what you actually used in your example were quotes (").

Hope this helps.

Pete

On Aug 10, 12:18 am, Dave P wrote:
I know how to remove leading apostrophes but I can't figure out how to remove
trailing apostrophes but still leave a number as text.

For example, I have a number like 018" in my spreadsheet. Of course, it is
actually " 018" when you go to edit the cell. I want to be able to remove
the " after the 8 but leave the cell as " 018.

My leading apostrophe macro doesn't work and if I use a find and replace
command, it removes both apostrophes and leaves me with 18 as the cell value.

What am I missing? Thanks





All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com