LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Between Dates Criteria

I want to be able to do something while inbetween dates. Start date is in D1
and End date is in D2. Across row 1 starting in G1 is dates (01/01/09,
02/01/09, etc...)

Sub Test1()

Range("G3:G5").Select
Selection.Copy

Range("G1").Select
Do While ((ActiveCell) = Range("D1"))
ActiveCell.Offset(0, 1).Select
If ((ActiveCell) <= Range("D2")) Then
Exit Do
End If
Loop
ActiveCell.Offset(2, 0).Select
ActiveSheet.Paste
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report using dates as a criteria UKMAN Excel Worksheet Functions 1 March 4th 10 05:10 PM
Counting criteria with dates in Jan,Feb etc Michael B Excel Discussion (Misc queries) 3 December 8th 08 11:58 AM
Sumif criteria between two dates Steve R Excel Worksheet Functions 3 October 17th 08 11:04 AM
criteria + between dates [email protected] Excel Worksheet Functions 2 March 22nd 07 10:56 AM
how to sum using dates as a criteria Lius Excel Worksheet Functions 8 December 2nd 04 11:11 AM


All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"