Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the below code to look down a column of values and if the value =
0, then delete the entire row. I now have a list of 466 places on one sheet and a summary sheet with 8-10 laces Would anyone know how to change the code to now look down the summary sheet and then delete all those rows of places on the 1st sheets that are not on the summary sheet Your help is greatly appreciated Code: Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With With ActiveSheet .Select ViewMode = ActiveWindow.View ActiveWindow.View = xlNormalView .DisplayPageBreaks = False Firstrow = 5 Lastrow = 466 For Lrow = Lastrow To Firstrow Step -1 With .Cells(Lrow, "B") If Not IsError(.Value) Then If .Value = 0 Then .EntireRow.Delete End If End With Next Lrow End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Worksheet to a new Workbook creating if it doesn't exist and add more Worksheets if it does exist | Excel Programming | |||
Delete row if no date exist | Excel Programming | |||
Command Line. How to tell to XL : If the xls file exist : Open it, if it does not exist : Create it. | Excel Programming | |||
delete sheet if it exist | Excel Programming | |||
How2 Delete "Not exist" charts/sheets? | Excel Programming |