Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Date Function in VBA???

Hello Everyone,

The book that I have is NOT very descriptive when it comes to time/date
functions. When looking for a date using a regular formula, I can get the
date by using: DAY(L2). What is the VBA equivalent to that??? I want to
look at a cell and look at the day. If the date in lets say cell A1 is
10/04/04, then I want to insert a row to make it 10/01/04. Plus, I would
like to insert more rows leading up to the date of 10/04/04. So, it would
look like this:

10/01/04 This would be inserted by VBA
10/02/04 This would be inserted by VBA
10/03/04 This would be inserted by VBA
10/04/04 This was the original date in cell A1.

Any help would be appreciated... mv


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Date Function in VBA???

Day(Range("A1").Value)

--

HTH

RP

"Michael Vaughan" wrote in message
...
Hello Everyone,

The book that I have is NOT very descriptive when it comes to time/date
functions. When looking for a date using a regular formula, I can get the
date by using: DAY(L2). What is the VBA equivalent to that??? I want to
look at a cell and look at the day. If the date in lets say cell A1 is
10/04/04, then I want to insert a row to make it 10/01/04. Plus, I would
like to insert more rows leading up to the date of 10/04/04. So, it would
look like this:

10/01/04 This would be inserted by VBA
10/02/04 This would be inserted by VBA
10/03/04 This would be inserted by VBA
10/04/04 This was the original date in cell A1.

Any help would be appreciated... mv




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date Function in VBA???

Activecell.Resize(Day(ActiveCell-1),1).EntireRow.Insert

--
Regards,
Tom Ogilvy

"Michael Vaughan" wrote in message
...
Hello Everyone,

The book that I have is NOT very descriptive when it comes to time/date
functions. When looking for a date using a regular formula, I can get the
date by using: DAY(L2). What is the VBA equivalent to that??? I want to
look at a cell and look at the day. If the date in lets say cell A1 is
10/04/04, then I want to insert a row to make it 10/01/04. Plus, I would
like to insert more rows leading up to the date of 10/04/04. So, it would
look like this:

10/01/04 This would be inserted by VBA
10/02/04 This would be inserted by VBA
10/03/04 This would be inserted by VBA
10/04/04 This was the original date in cell A1.

Any help would be appreciated... mv




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date Function in VBA???

Activecell.Resize(Day(ActiveCell-1),1).EntireRow.Insert


"Michael Vaughan" wrote in message
...
Hello Everyone,

The book that I have is NOT very descriptive when it comes to time/date
functions. When looking for a date using a regular formula, I can get the
date by using: DAY(L2). What is the VBA equivalent to that??? I want to
look at a cell and look at the day. If the date in lets say cell A1 is
10/04/04, then I want to insert a row to make it 10/01/04. Plus, I would
like to insert more rows leading up to the date of 10/04/04. So, it would
look like this:

10/01/04 This would be inserted by VBA
10/02/04 This would be inserted by VBA
10/03/04 This would be inserted by VBA
10/04/04 This was the original date in cell A1.

Any help would be appreciated... mv




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
Function to lookup date on tab in excel and populate date on calen MGC Excel Worksheet Functions 0 February 4th 10 04:48 AM
Difference betwen Excel Date () Function and System Date Khalil[_2_] Excel Worksheet Functions 2 June 16th 09 01:10 PM
MAX figure within a date range as a function of today()'s date irvine79 Excel Worksheet Functions 6 February 20th 07 03:28 PM
Date Function formula that will return the date of a specific week Greg Excel Worksheet Functions 4 June 12th 06 05:07 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM


All times are GMT +1. The time now is 09:28 AM.

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

About Us

"It's about Microsoft Excel"