View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Probably a Stupid Question

Here is a possible solution. A bit ugly but it will work... Add a helper
column to the source data. In this column concatenate a character that you do
not find in your text field to the front of your text string. Assuming your
text field is in column A then use a formula such as
="-" & A1
Copy that formula down to concatenate the the dash to the front of the text
field. Now copy and paste values so that you end up with text that looks like
this
-00AF234
-014F

Now you can do a find and replace looking for -00 and replacing with
nothing. Then do -0 replacing with nothing...

Like I said a bit ugly but it will work.
--
HTH...

Jim Thomlinson


"Paige" wrote:

I have data formatted as text, with leading zeroes, such as 00AF234, 014F,
etc. Is there a way to remove these leading zeroes (other than VB)? The
data could be of any length and have 0, 1, 2 or more leading zeroes. Can't
do find/replace because other zeroes (like in the middle of the data) would
also be removed. Nothing I've tried seems to work, short of sorting by
length, then doing =right. Any ideas please?