Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With the following macro (copied from this usenet, modified & working
thank you) is there a way the row number (in this example 771) updates automatically when I manually add rows between 3 & 771. ****************** Dim rng As Range, i As Long Dim lastrow As Long With Worksheets("Sheet1") Set rng = .Range(.Cells(3, 2), .Cells(771, 2).End(xlUp)) End With With Worksheets("Sheet3") lastrow = .Cells(Rows.Count, 1).End(xlUp).Row For i = lastrow To 1 Step -1 If Application.CountIf(rng, .Cells(i, 1)) < 0 Then .Rows(i).Delete End If Next i End With ********************* TIA Ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
range question | Excel Programming | |||
Range question | Excel Programming | |||
Used Range Question | Excel Programming | |||
Range.Formula and Range question using Excel Automation | Excel Programming |