Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
LOFE,
I mean that each worksheet has a varying number of rows of information. The information starts at A5 on each sheet. Where would I place this code to attempt to run it? I expected to place it in ThisWorkbook, but nothing happened. Thanks, Mike "LOFE" wrote: Coupe of assumptions in the following code. You're starting in A1 and there is data in each cell in Column A. I'm a bit unsure what you mean by Column H having varying lengths - do you mean format? Anyways, maybe this will help Do Until Activecell = "" DataSheet = ActiveSheet.Name MyDate = Format(Activecell(1,8),"dd/mm/yyyy") MyToday = Format(Now(),"dd/mm/yyyy") MyFuture = Format(MyToday + 7,"dd/mm/yyyy") If MyDate < MyFuture AND MyDate MyToday Then Activecell.EntireRow.Copy Sheets("Next Week").Select 'Or whatever sheet it is that you're using ActiveSheet.Paste Sheets(DataSheet).Select Application.CutCopyMode = False End If Activecell(2,1).Select Loop "MSchmidty2" wrote: Hi, I'm looking for some help with VBA to test dates in the H column of multiple worksheets (H column has varying lengths). If the date is within the next week, I would like to copy the row to a seperate worksheet. In essence, I would like to create a week lookahead report. I'm able to work this out with functions etc, but would like to learn how to do it VBA-style. Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating new worksheets and appending data from multiple worksheets. | Excel Programming | |||
date from multiple worksheets | Excel Worksheet Functions | |||
Lookup date on multiple worksheets, total amts for adjacent colmn | Excel Discussion (Misc queries) | |||
MIN date from multiple different worksheets in a workbook | Excel Worksheet Functions | |||
Transferring date from multiple worksheets to a "totals" worksheet. | Excel Discussion (Misc queries) |