Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default delete rows with 0 values

how can i create a macro that select column O, delete every row that contains
empty cells, cells with 0 values, and non-numeric cells such as --------.
thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default delete rows with 0 values

Sub test
dim rng as range

For each rng in Range("O2", Range("O2").End(xlDown))
If rng.value = "0" or rng.value= "---------"Then rng.clear
Next
columns("O:O").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
End sub
Regards
Jean-Yves


"andresg1975" wrote in message
...
how can i create a macro that select column O, delete every row that
contains
empty cells, cells with 0 values, and non-numeric cells such as --------.
thanks



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
Delete rows with duplicated values Emece Excel Discussion (Misc queries) 5 February 22nd 10 12:36 PM
Delete rows with duplicate values One-Leg Excel Discussion (Misc queries) 1 February 17th 08 06:49 PM
How to Delete empty rows in excel in b/w rows with values Dennis Excel Worksheet Functions 3 August 28th 07 04:15 PM
Delete Rows where there are #N/A Values FIRSTROUNDKO via OfficeKB.com Excel Worksheet Functions 3 August 3rd 06 04:03 PM
Delete rows with numeric values, leave rows with text GSpline Excel Programming 5 October 11th 05 12:44 AM


All times are GMT +1. The time now is 08:42 PM.

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"