Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows based on value...
Hi...
I have 4000 vertical records. In columns A, B and C I have product information. In column D I have a value that ranages from 0-5. I need to delete all rows were the value in cell D is 0 (zero). Has anyone got any useful code? I'm stuck and my brain is bleeding! Thanks in advance G |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows based on value...
Hi
Start here http://www.rondebruin.nl/delete.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Gordon" wrote in message ... Hi... I have 4000 vertical records. In columns A, B and C I have product information. In column D I have a value that ranages from 0-5. I need to delete all rows were the value in cell D is 0 (zero). Has anyone got any useful code? I'm stuck and my brain is bleeding! Thanks in advance G |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows based on value...
Sub DeleteRows()
Dim lRow as Long 'Last Row Dim cnt as Long lRow = Range("D" & Rows.Count).End(xlUp).Row For cnt = lRow to 1 Step - 1 If Range("D" & cnt) = 0 Then Rows(cnt).Delete Next End Sub HTH Charles Chickering Gordon wrote: Hi... I have 4000 vertical records. In columns A, B and C I have product information. In column D I have a value that ranages from 0-5. I need to delete all rows were the value in cell D is 0 (zero). Has anyone got any useful code? I'm stuck and my brain is bleeding! Thanks in advance G |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows based on value...
select the data, do data =filter=Autofilter
in the dropdown for D, select zero. select all the records (except the header row) and delete if you need code, turn on the macro recorder while you do it manually. -- Regards, Tom Ogilvy "Gordon" wrote: Hi... I have 4000 vertical records. In columns A, B and C I have product information. In column D I have a value that ranages from 0-5. I need to delete all rows were the value in cell D is 0 (zero). Has anyone got any useful code? I'm stuck and my brain is bleeding! Thanks in advance G |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Rows based on value | Excel Worksheet Functions | |||
Delete Rows Based on Words | Excel Discussion (Misc queries) | |||
Delete rows based on criteria | Excel Discussion (Misc queries) | |||
Delete rows based on certain criteria | Excel Discussion (Misc queries) | |||
Delete rows based on Cell name | Excel Programming |