Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
AUTOMATIC DELETE
Could anyone please tell me how to write a sub() to automatically delete
null numval lines in a sheet viz sub DelNul() Dim Cell As Range For Each Cell In Sheets("'Sheet1").UsedRange If Sheets("Sheet1").Range(Cell.Address).value - vbNullString Then Delete Line 'OR SOMETHING LIKE THIS? Else End If Next End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
AUTOMATIC DELETE
Your looping over all cells in the usedrange and if any of them are blank,
deleting the entire row. if that is what you want to do, simpler would be: Dim rng as Range set rng = Sheets("Sheet1").Cells.Specialcells(xlblanks).Enti reRow if not rng is nothing then rng.delete End if -- Regards, Tom Ogilvy "zebra" wrote in message ... Could anyone please tell me how to write a sub() to automatically delete null numval lines in a sheet viz sub DelNul() Dim Cell As Range For Each Cell In Sheets("'Sheet1").UsedRange If Sheets("Sheet1").Range(Cell.Address).value - vbNullString Then Delete Line 'OR SOMETHING LIKE THIS? Else End If Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can i delete automatic page breaks in excel | New Users to Excel | |||
Automatic delete row in Excel 2003 | Excel Discussion (Misc queries) | |||
How do I set up an automatic delete or move of a row of data? | Excel Discussion (Misc queries) | |||
What is an automatic way to delete all rows of a certain kind | Excel Discussion (Misc queries) | |||
automatic delete possible? | Excel Worksheet Functions |