Remove Leading Spaces
I've got a column of cells filled with Product ID's. They all have a space
at the beginning, such as ' 9025342 ' 1023456 I've tried Trim, LTrim, Clean, etc, etc. Nothing seems to work on these cells. Any ideas? |
Assuming all entries have the apostrophe-single space combo at the beginning
of the product number, try this: =RIGHT(A1,LEN(A1)-2) "Kirk P." wrote in message ... I've got a column of cells filled with Product ID's. They all have a space at the beginning, such as ' 9025342 ' 1023456 I've tried Trim, LTrim, Clean, etc, etc. Nothing seems to work on these cells. Any ideas? |
In a standard module paste in:
Sub nopreapostophe() For Each c In Selection If c.PrefixCharacter = "'" Then c.Value = c.Value Next End Sub Back at the worksheet, Highlight/Select your desired range of Cells to examine/fix. And then run: nopreapostophe() HTH "Michael Malinsky" wrote in message ... Assuming all entries have the apostrophe-single space combo at the beginning of the product number, try this: =RIGHT(A1,LEN(A1)-2) "Kirk P." wrote in message ... I've got a column of cells filled with Product ID's. They all have a space at the beginning, such as ' 9025342 ' 1023456 I've tried Trim, LTrim, Clean, etc, etc. Nothing seems to work on these cells. Any ideas? |
Sorry, I got your Q confused with another Q asked by someone - their Q,
which had to do only with the removal of the " ' " preceeding a bunch of numbers.. "Jim May" wrote in message news:4ZDVd.30376$7z6.29057@lakeread04... In a standard module paste in: Sub nopreapostophe() For Each c In Selection If c.PrefixCharacter = "'" Then c.Value = c.Value Next End Sub Back at the worksheet, Highlight/Select your desired range of Cells to examine/fix. And then run: nopreapostophe() HTH "Michael Malinsky" wrote in message ... Assuming all entries have the apostrophe-single space combo at the beginning of the product number, try this: =RIGHT(A1,LEN(A1)-2) "Kirk P." wrote in message ... I've got a column of cells filled with Product ID's. They all have a space at the beginning, such as ' 9025342 ' 1023456 I've tried Trim, LTrim, Clean, etc, etc. Nothing seems to work on these cells. Any ideas? |
All times are GMT +1. The time now is 05:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com