Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am looks for code that will delete the entire row if the value in column L is zero. Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
lastrow = Cells(Rows.count, "A").End(xlUp).Row
Set myrange = Range("L1:L" & lastrow) For Each count In myrange If count.Value = "0" Then count.EntireRow.Delete End If Next |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI Aron
Use the following code Sub test() Dim i, j As Integer Set starta = ActiveSheet.Range("L1") LR = ActiveSheet.Range("L" & Rows.Count).End(xlUp).Offset(1, 0).Row For i = LR To 0 Step -1 If starta.Offset(i, 0).Value = 0 Then starta.Offset(i, 0).EntireRow.Delete Next i End Sub Thanks Shanu |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This work great! Thanks!
"sharmashanu" wrote: HI Aron Use the following code Sub test() Dim i, j As Integer Set starta = ActiveSheet.Range("L1") LR = ActiveSheet.Range("L" & Rows.Count).End(xlUp).Offset(1, 0).Row For i = LR To 0 Step -1 If starta.Offset(i, 0).Value = 0 Then starta.Offset(i, 0).EntireRow.Delete Next i End Sub Thanks Shanu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I automatically delete a row, if one cell equals zero? | Excel Worksheet Functions | |||
countif column d equals x and column a noblank | Excel Worksheet Functions | |||
Delete Columns if value equals zero | Excel Programming | |||
delete every row where value equals user input | Excel Programming | |||
custom filter does not work when selecting 'equals' X AND 'equals' | Excel Discussion (Misc queries) |