Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kirk P.
 
Posts: n/a
Default 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?
  #2   Report Post  
Michael Malinsky
 
Posts: n/a
Default

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?



  #3   Report Post  
Jim May
 
Posts: n/a
Default

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?





  #4   Report Post  
Jim May
 
Posts: n/a
Default

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?







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove all spaces in a text string dn Excel Discussion (Misc queries) 3 April 2nd 23 07:20 PM
remove spaces in text in excel GnarlyCar Excel Discussion (Misc queries) 3 February 1st 05 05:02 PM
how do I remove spaces from cells that were pasted GolfKing Excel Discussion (Misc queries) 1 December 31st 04 07:40 AM
Remove link fr a column of entries Rasoul Khoshravan Azar Excel Discussion (Misc queries) 1 December 17th 04 08:07 PM
Remove link fr a column of entries Rasoul Khoshravan Azar Excel Discussion (Misc queries) 1 December 17th 04 06:44 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"