Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Deleting a row with 0 in column A

In my worksheet Column A contains zeroes and other numbers with 0 in
them like 4500. I want to use a macro to delete those rows in column A
that just contain zeroes. There are other numbers in column A
containing 0 but these zeroes are part of at least a four digit number
Would you please help me write a macro to do this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Deleting a row with 0 in column A

i=1
Do While cells(i,1)<""
s=trim(cstr(cells(i,1)))
if instr(s,"0") then
rows(i).delete
else
i=i+1
end if
Loop

-----Original Message-----
In my worksheet Column A contains zeroes and other

numbers with 0 in
them like 4500. I want to use a macro to delete those

rows in column A
that just contain zeroes. There are other numbers in

column A
containing 0 but these zeroes are part of at least a four

digit number
Would you please help me write a macro to do this.
.

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
deleting numbers in a column Calvinator Excel Worksheet Functions 2 January 4th 10 08:17 AM
Deleting every nth through every nth row in a column Chris Excel Discussion (Misc queries) 1 July 9th 06 09:23 AM
Deleting nth row or column tarunpathria Excel Discussion (Misc queries) 1 February 15th 06 10:36 AM
Deleting a column reena Excel Discussion (Misc queries) 4 February 15th 06 06:45 AM
Deleting content in a column JamesBL Excel Worksheet Functions 1 November 2nd 04 11:16 PM


All times are GMT +1. The time now is 04:53 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"