Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Remove leading zeros from downloaded data

Hi,

I have a spreadsheet of data that was downloaded from a corporate system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that column. The
only way I can seem to do it is to physically click in each cell and delete
the apostrophe. Does anyone have any suggestions on how I can do that all at
once for all 1400 plus numbers I have in that column?

thanks.

Carla
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,081
Default Remove leading zeros from downloaded data

Copy an empty cell, then select all your cells that have these numbers and
use Edit-Paste Special-Values-Add


"Carla" wrote:

Hi,

I have a spreadsheet of data that was downloaded from a corporate system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that column. The
only way I can seem to do it is to physically click in each cell and delete
the apostrophe. Does anyone have any suggestions on how I can do that all at
once for all 1400 plus numbers I have in that column?

thanks.

Carla

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Remove leading zeros from downloaded data

Another play to try is Data Text to Columns
Select the entire col, click Data Text to Columns Finish
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Carla" wrote:
Hi,

I have a spreadsheet of data that was downloaded from a corporate system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that column. The
only way I can seem to do it is to physically click in each cell and delete
the apostrophe. Does anyone have any suggestions on how I can do that all at
once for all 1400 plus numbers I have in that column?

thanks.

Carla

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Remove leading zeros from downloaded data

I have a spreadsheet of data that was downloaded from a corporate system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that column.
The
only way I can seem to do it is to physically click in each cell and
delete
the apostrophe. Does anyone have any suggestions on how I can do that all
at
once for all 1400 plus numbers I have in that column?


Still another method.... select the entire column, click Edit/Replace on
Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in the "Find
what" field, leave the "Replace with" field blank and press the "Replace
All" button.

Rick

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Remove leading zeros from downloaded data

Did you get that to work?


--


Regards,


Peo Sjoblom




"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a spreadsheet of data that was downloaded from a corporate system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that column.
The
only way I can seem to do it is to physically click in each cell and
delete
the apostrophe. Does anyone have any suggestions on how I can do that
all at
once for all 1400 plus numbers I have in that column?


Still another method.... select the entire column, click Edit/Replace on
Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in the "Find
what" field, leave the "Replace with" field blank and press the "Replace
All" button.

Rick





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Remove leading zeros from downloaded data

Yes, I tried it before I posted it and it "appeared" to work fine. Why are
you asking? Does it not always work this way?

Rick


"Peo Sjoblom" wrote in message
...
Did you get that to work?


--


Regards,


Peo Sjoblom




"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a spreadsheet of data that was downloaded from a corporate
system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that column.
The
only way I can seem to do it is to physically click in each cell and
delete
the apostrophe. Does anyone have any suggestions on how I can do that
all at
once for all 1400 plus numbers I have in that column?


Still another method.... select the entire column, click Edit/Replace on
Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in the "Find
what" field, leave the "Replace with" field blank and press the "Replace
All" button.

Rick




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Remove leading zeros from downloaded data

I have never gotten it to work when it was preceded to make a number text

Try this

type

'012345

in A1, press enter and try to replace it


I always get "Microsoft Office Excel cannot find a match"

That is why copying an empty cell and pasting special selecting add works

The only times I got it to work was probably when it was visible in the cell
and not only in the formula bar



--


Regards,


Peo Sjoblom



"Rick Rothstein (MVP - VB)" wrote in
message ...
Yes, I tried it before I posted it and it "appeared" to work fine. Why are
you asking? Does it not always work this way?

Rick


"Peo Sjoblom" wrote in message
...
Did you get that to work?


--


Regards,


Peo Sjoblom




"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a spreadsheet of data that was downloaded from a corporate
system.
One of the fields is formatted as text - '00000454589. I would like to
remove all the leading zeros at the front of each number in that
column. The
only way I can seem to do it is to physically click in each cell and
delete
the apostrophe. Does anyone have any suggestions on how I can do that
all at
once for all 1400 plus numbers I have in that column?

Still another method.... select the entire column, click Edit/Replace on
Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in the "Find
what" field, leave the "Replace with" field blank and press the "Replace
All" button.

Rick






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Remove leading zeros from downloaded data

I copied your "number" from your post and pasted it several times in two
separate columns. I then took the "number" Carla posted and pasted it into
the two columns also. I then left one column formatted as General and the
other column I formatted as Text. I selected both columns, one at a time,
and applied the Replace function on each... for both columns, the zeroes
were removed... in the General column, the text became actual numbers (that
is, they became right justified), in the text column, the numbers stayed as
Text (that is, they remained left justified); but in both cases, the leading
zeroes were removed. If it matters any, I am using XL2003.

Wait a minute...

I just looked back at the columns and I must have missed this on my first
viewing... the original pasting of your number, and only that INITIAL
pasting of YOUR number, didn't change. Well, the apostrophe was removed, but
not the zero. For every other pasting of your number and all pastings of
Carla's number, the leading zero was removed, but not the FIRST pasting of
your number only. Strange.

Wait a minute...

I just tried it again on a fresh sheet and this time it worked perfectly for
all pasted numbers. I'm at a loss here. Any insights on any of this?

Rick


"Peo Sjoblom" wrote in message
...
I have never gotten it to work when it was preceded to make a number text

Try this

type

'012345

in A1, press enter and try to replace it


I always get "Microsoft Office Excel cannot find a match"

That is why copying an empty cell and pasting special selecting add works

The only times I got it to work was probably when it was visible in the
cell and not only in the formula bar



--


Regards,


Peo Sjoblom



"Rick Rothstein (MVP - VB)" wrote in
message ...
Yes, I tried it before I posted it and it "appeared" to work fine. Why
are you asking? Does it not always work this way?

Rick


"Peo Sjoblom" wrote in message
...
Did you get that to work?


--


Regards,


Peo Sjoblom




"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a spreadsheet of data that was downloaded from a corporate
system.
One of the fields is formatted as text - '00000454589. I would like
to
remove all the leading zeros at the front of each number in that
column. The
only way I can seem to do it is to physically click in each cell and
delete
the apostrophe. Does anyone have any suggestions on how I can do that
all at
once for all 1400 plus numbers I have in that column?

Still another method.... select the entire column, click Edit/Replace
on Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in the
"Find what" field, leave the "Replace with" field blank and press the
"Replace All" button.

Rick






  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,081
Default Remove leading zeros from downloaded data

I'm in agreement with Peo - Replace has NEVER worked for me. Not in 2000,
2002, 2003, and 2007

Try manually entering the #s with the leading apostrophe and then doing the
replace. What happens then??

"Rick Rothstein (MVP - VB)" wrote:

I copied your "number" from your post and pasted it several times in two
separate columns. I then took the "number" Carla posted and pasted it into
the two columns also. I then left one column formatted as General and the
other column I formatted as Text. I selected both columns, one at a time,
and applied the Replace function on each... for both columns, the zeroes
were removed... in the General column, the text became actual numbers (that
is, they became right justified), in the text column, the numbers stayed as
Text (that is, they remained left justified); but in both cases, the leading
zeroes were removed. If it matters any, I am using XL2003.

Wait a minute...

I just looked back at the columns and I must have missed this on my first
viewing... the original pasting of your number, and only that INITIAL
pasting of YOUR number, didn't change. Well, the apostrophe was removed, but
not the zero. For every other pasting of your number and all pastings of
Carla's number, the leading zero was removed, but not the FIRST pasting of
your number only. Strange.

Wait a minute...

I just tried it again on a fresh sheet and this time it worked perfectly for
all pasted numbers. I'm at a loss here. Any insights on any of this?

Rick


"Peo Sjoblom" wrote in message
...
I have never gotten it to work when it was preceded to make a number text

Try this

type

'012345

in A1, press enter and try to replace it


I always get "Microsoft Office Excel cannot find a match"

That is why copying an empty cell and pasting special selecting add works

The only times I got it to work was probably when it was visible in the
cell and not only in the formula bar



--


Regards,


Peo Sjoblom



"Rick Rothstein (MVP - VB)" wrote in
message ...
Yes, I tried it before I posted it and it "appeared" to work fine. Why
are you asking? Does it not always work this way?

Rick


"Peo Sjoblom" wrote in message
...
Did you get that to work?


--


Regards,


Peo Sjoblom




"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a spreadsheet of data that was downloaded from a corporate
system.
One of the fields is formatted as text - '00000454589. I would like
to
remove all the leading zeros at the front of each number in that
column. The
only way I can seem to do it is to physically click in each cell and
delete
the apostrophe. Does anyone have any suggestions on how I can do that
all at
once for all 1400 plus numbers I have in that column?

Still another method.... select the entire column, click Edit/Replace
on Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in the
"Find what" field, leave the "Replace with" field blank and press the
"Replace All" button.

Rick







  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Remove leading zeros from downloaded data

Ah! There is the error Peo was talking about.<g

So, there is a difference between typing the number in with a leading
apostrophe and pasting the number already having a leading apostrophe in.

Very strange.

Rick


"Duke Carey" wrote in message
...
I'm in agreement with Peo - Replace has NEVER worked for me. Not in 2000,
2002, 2003, and 2007

Try manually entering the #s with the leading apostrophe and then doing
the
replace. What happens then??

"Rick Rothstein (MVP - VB)" wrote:

I copied your "number" from your post and pasted it several times in two
separate columns. I then took the "number" Carla posted and pasted it
into
the two columns also. I then left one column formatted as General and the
other column I formatted as Text. I selected both columns, one at a time,
and applied the Replace function on each... for both columns, the zeroes
were removed... in the General column, the text became actual numbers
(that
is, they became right justified), in the text column, the numbers stayed
as
Text (that is, they remained left justified); but in both cases, the
leading
zeroes were removed. If it matters any, I am using XL2003.

Wait a minute...

I just looked back at the columns and I must have missed this on my first
viewing... the original pasting of your number, and only that INITIAL
pasting of YOUR number, didn't change. Well, the apostrophe was removed,
but
not the zero. For every other pasting of your number and all pastings of
Carla's number, the leading zero was removed, but not the FIRST pasting
of
your number only. Strange.

Wait a minute...

I just tried it again on a fresh sheet and this time it worked perfectly
for
all pasted numbers. I'm at a loss here. Any insights on any of this?

Rick


"Peo Sjoblom" wrote in message
...
I have never gotten it to work when it was preceded to make a number
text

Try this

type

'012345

in A1, press enter and try to replace it


I always get "Microsoft Office Excel cannot find a match"

That is why copying an empty cell and pasting special selecting add
works

The only times I got it to work was probably when it was visible in the
cell and not only in the formula bar



--


Regards,


Peo Sjoblom



"Rick Rothstein (MVP - VB)" wrote in
message ...
Yes, I tried it before I posted it and it "appeared" to work fine. Why
are you asking? Does it not always work this way?

Rick


"Peo Sjoblom" wrote in message
...
Did you get that to work?


--


Regards,


Peo Sjoblom




"Rick Rothstein (MVP - VB)" wrote
in
message ...
I have a spreadsheet of data that was downloaded from a corporate
system.
One of the fields is formatted as text - '00000454589. I would
like
to
remove all the leading zeros at the front of each number in that
column. The
only way I can seem to do it is to physically click in each cell
and
delete
the apostrophe. Does anyone have any suggestions on how I can do
that
all at
once for all 1400 plus numbers I have in that column?

Still another method.... select the entire column, click
Edit/Replace
on Excel's menu bar (or just key-in Ctrl+H), put an apostrophe in
the
"Find what" field, leave the "Replace with" field blank and press
the
"Replace All" button.

Rick








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
REMOVE LEADING ZEROS ichihina Excel Worksheet Functions 2 March 14th 07 07:58 PM
Remove leading zeros from column Rich K. Excel Discussion (Misc queries) 2 January 2nd 07 09:43 PM
How to remove leading zeros using excel 2000 RodJB Excel Discussion (Misc queries) 7 December 23rd 05 02:28 AM
remove leading zeros from text strings snooze Excel Worksheet Functions 2 July 26th 05 05:59 PM
How do I eliminate leading zeros from downloaded data? Vanessa Excel Worksheet Functions 2 June 27th 05 05:11 PM


All times are GMT +1. The time now is 12:54 PM.

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

About Us

"It's about Microsoft Excel"