Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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/


Reply
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
Time frame conversion LaurenM Excel Discussion (Misc queries) 1 February 10th 09 11:06 PM
Time Frame Richard Excel Discussion (Misc queries) 1 May 13th 08 02:37 PM
extract date between a given time frame B New Users to Excel 1 April 3rd 07 09:18 PM
How do I sum within a set time frame from the current date? Skydiver Driver Excel Worksheet Functions 3 November 10th 05 03:43 AM
3 Time frame 11050204 Excel Worksheet Functions 1 June 27th 05 03:05 AM


All times are GMT +1. The time now is 11:07 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"