ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   data time frame (https://www.excelbanter.com/excel-programming/410781-data-time-frame.html)

[email protected]

data time frame
 
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

Robert Martim, Excel

data time frame
 
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/...p_HT_Chart.asp
FORUM: http://www.msofficegurus.com/forum/


[email protected]

data time frame
 
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

On May 12, 8:53*am, Robert Martim, Excel wrote:
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/...p_HT_Chart.asp
*FORUM:http://www.msofficegurus.com/forum/




All times are GMT +1. The time now is 01:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com