Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
HELP!!!! I have a macro that will go basically sheet by sheet and do a lookup
to find a date. The macro works great but takes a very long time to run and I need to add about another 25 sheet to the end. Is there a way to write this so it check each sheet between and run it a little faster? Sub populate() With Sheets("Linda Master List") lastRow1 = .Cells(.Rows.Count, "A").End(xlUp).Row End With With Sheets("ADT Test (03.16.09)") lastRow2 = .Cells(.Rows.Count, "A").End(xlUp).Row End With For i = 2 To lastRow1 k = 2 For j = 2 To lastRow2 If Sheets("Linda Master List").Cells(i, 1).Value = Sheets("ADT Test (03.16.09)").Cells(j, 1).Value Then Sheets("Linda Master List").Cells(i, k).Value = Sheets("ADT Test (03.16.09)").Cells(j, 2).Value k = k + 1 End If Next j Next i With Sheets("Linda Master List") lastRow1 = .Cells(.Rows.Count, "A").End(xlUp).Row End With With Sheets("PH1 WV1") lastRow2 = .Cells(.Rows.Count, "A").End(xlUp).Row End With For i = 2 To lastRow1 k = 2 For j = 2 To lastRow2 If Sheets("Linda Master List").Cells(i, 1).Value = Sheets("PH1 WV1").Cells(j, 1).Value Then Sheets("Linda Master List").Cells(i, k).Value = Sheets("PH1 WV1").Cells(j, 2).Value k = k + 1 End If Next j Next i |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro help needed :( | Excel Worksheet Functions | |||
Macro Help Needed :( | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |