Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I modify the following Macro so that it will look at the value of the
cell to find the word? Right now its set to look at the cell, but the cells are linked to other sheets. Private Sub Worksheet_Activate() Call Sheet4.getvalues End Sub -------------------------------------------------- Sub getvalues() lr = Application.Max(2, Cells(Rows.Count, 1).End(xlUp).Row) 'MsgBox lr Rows("2:" & lr).ClearContents With Worksheets("Master") slr = .Cells(Rows.Count, "c").End(xlUp).Row 'MsgBox slr For i = 2 To slr dlr = Cells(Rows.Count, "a").End(xlUp).Row + 1 ' If .Cells(i, "ag") = overturned Then .Rows(i).Copy Rows(dlr) If .Cells(i, "ag") = overturned And Not IsDate(.Cells(i, "bm")) Then ..Rows(i).Copy Rows(dlr) Next i End With End Sub ------------------------------------------- Sub Fixit1() 'Use if event macro stops working Application.EnableEvents = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro - modification | Excel Discussion (Misc queries) | |||
Macro modification | Excel Discussion (Misc queries) | |||
Macro modification | Excel Programming | |||
Macro Modification Help | Excel Programming | |||
Need Macro Modification | Excel Programming |