#1   Report Post  
xgirl
 
Posts: n/a
Default Remove zeros

I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger number.
And I need to write this into a macro. Thanks for any suggestions.
  #3   Report Post  
xgirl
 
Posts: n/a
Default

No, I can't there is text inter-mixed with the data on different rows. I
just want to get rid of the zeros in the one column.

"Don Guillett" wrote:

Can't you just sort and delete the rows? Record a macro if desired.

--
Don Guillett
SalesAid Software

"xgirl" wrote in message
...
I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger

number.
And I need to write this into a macro. Thanks for any suggestions.




  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Select the column.

DataFilterAutofilter.

Click on drop arrow and select 0 from the choices.

EditClear Contents.

DataFilterAutofilter to turn off.


Gord Dibben Excel MVP

On Mon, 11 Apr 2005 17:07:02 -0700, "xgirl"
wrote:

No, I can't there is text inter-mixed with the data on different rows. I
just want to get rid of the zeros in the one column.

"Don Guillett" wrote:

Can't you just sort and delete the rows? Record a macro if desired.

--
Don Guillett
SalesAid Software

"xgirl" wrote in message
...
I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger

number.
And I need to write this into a macro. Thanks for any suggestions.





  #5   Report Post  
CLR
 
Posts: n/a
Default

Put this in B1 and copy down...........

=IF(A1=0,"",A1)

Vaya con Dios,
Chuck, CABGx3


"xgirl" wrote in message
...
I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger

number.
And I need to write this into a macro. Thanks for any suggestions.





  #6   Report Post  
xgirl
 
Posts: n/a
Default

Thanks Chuck, that will work.

"CLR" wrote:

Put this in B1 and copy down...........

=IF(A1=0,"",A1)

Vaya con Dios,
Chuck, CABGx3


"xgirl" wrote in message
...
I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger

number.
And I need to write this into a macro. Thanks for any suggestions.




  #7   Report Post  
CLR
 
Posts: n/a
Default

You're welcome..........glad to help


Vaya con Dios,
Chuck, CABGx3


"xgirl" wrote in message
...
Thanks Chuck, that will work.

"CLR" wrote:

Put this in B1 and copy down...........

=IF(A1=0,"",A1)

Vaya con Dios,
Chuck, CABGx3


"xgirl" wrote in message
...
I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger

number.
And I need to write this into a macro. Thanks for any suggestions.






  #8   Report Post  
Duke Carey
 
Posts: n/a
Default

Highlight your list of numbers, then press Ctrl-H

In the dialog, search for 0 and replace it with nothing. Click on the
Options button and check the option for Match Entire Cell Contents

Record it to a macro if needs be, but be sure to adjust the range it selects
before putting it into production

"xgirl" wrote:

I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger number.
And I need to write this into a macro. Thanks for any suggestions.

  #9   Report Post  
JulieD
 
Posts: n/a
Default

Hi

how about
---
Sub clearzeros()
For Each c In Selection
If c.Value = 0 Then
c.ClearContents
End If
Next
End Sub
---

to use, right mouse click on a sheet tab, choose view code, in the VBE
window choose insert / module, copy & paste the above code there, use ALT &
F11 to switch back to your workbook ... select the range you want to do this
to and choose tools / macro / macros .. .find clearzeros and press run.

NOTE: it is always a good idea to try things like this on a copy of your
workbook first just in case

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"xgirl" wrote in message
...
I have a list that looks like this:

0
1250897
0
0
9850254

I need to remove all the single zeros but not those within a larger
number.
And I need to write this into a macro. Thanks for any suggestions.



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
Format a cell to keep leading zeros. Shadyhosta New Users to Excel 5 July 27th 05 04:37 PM
Excel file saved as csv - dropping zeros Kathy Excel Discussion (Misc queries) 3 February 18th 05 07:15 PM
Remove link fr a column of entries Rasoul Khoshravan Azar Excel Discussion (Misc queries) 1 December 18th 04 10:51 PM
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 08:44 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"