Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have the follwoing loop, finalrow = Worksheets("Daily Summary").Range("A65536").End(xlUp).Row Set RNGd = Worksheets("Daily Summary").Cells(finalrow, 1) Do Until Worksheets("Daily Summary").Range(RNGd, RNGd).Value = TodaysDate Worksheets("Daily Summary").Range(RNGd, RNGd.Offset(0, 39)).Copy Destination:=Worksheets("Daily Summary").Range(RNGd, RNGd.Offset(0, 39)).Offset(1, 0) finalrow = Worksheets("Daily Summary").Range("A65536").End(xlUp).Row Set RNGd = Worksheets("Daily Summary").Cells(finalrow, 1) Loop Which basically checks the last cell in column A and if the date isn't equal to today, it copies that row to the next empty row. The loop keeps going until the final cell is equal to todays date. 1) Is there a better way of writing this code. 2) Specifically, I have to keep restating the final row and RNGd, can this be avoided. Thanks and Regards Richard |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
returning back to loop check condition without completing the loop | Excel Programming | |||
Loop to Filter, Name Sheets. If Blank, Exit Loop | Excel Programming | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming |