data time frame

J

jzamilpa3

i have a workbook where i need to set a start date to end date
i already have a a vba code copying specific columns from sheet1 to
sheet2.
on columnA of sheet1 there is a date and a time.
so i need a vba so i can look at a specific time frame
 
R

Robert Martim, Excel

Natalia

You can do as follows. Suppose you have today's date on A1 and you wish to
know the last day of the month in five months' time. Instead of using
EOMONTH, you ca do as follows:

=DATE(YEAR(A1),MONTH(A1)+6,0)

By the same token, if you wish to know the EDATE in five months' time, you'd
do as follows:

=DATE(YEAR(A1),MONTH(A1)+5,DAY(A1))

--
Robert
Author of RibbonX: Customizing the Office 2007 Ribbon:
LATEST INTERACTIVE TUTORIAL:
http://www.msofficegurus.com/videos/StepByStep_HT_Chart.asp
FORUM: http://www.msofficegurus.com/forum/
 
J

jzamilpa3

im a little confused on how to use that.
im looking for some thing like this, but the on columnA of sheet1 it
has a DATE and TIME

If Sheet1.Cells(a, 30) >= Sheet2.Cells(6, 2) And Sheet1.Cells(a, 30)
<= Sheet2.Cells(6, 3) Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top