Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default macro to make current date remain fixed

Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). The current date fills the
cell, but then changes the next day because of the internal clock.

Ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default macro to make current date remain fixed

On Jul 31, 11:41*am, line wrote:
Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. *Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). *The current date fills the
cell, but then changes the next day because of the internal clock.

Ideas?


CopyPaste SpecialValues
That will keep it fixed to that date, but it eliminates the formula
for the range you have replaced.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default macro to make current date remain fixed

Thank you sbi, I know about the copy paste special and that's why I'd like to
know if anyone has a macro idea to get around the copy paste special.

" wrote:

On Jul 31, 11:41 am, line wrote:
Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). The current date fills the
cell, but then changes the next day because of the internal clock.

Ideas?


CopyPaste SpecialValues
That will keep it fixed to that date, but it eliminates the formula
for the range you have replaced.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default macro to make current date remain fixed

On Jul 31, 12:34*pm, line wrote:
Thank you sbi, I know about the copy paste special and that's why I'd like to
know if anyone has a macro idea to get around the copy paste special.

" wrote:
On Jul 31, 11:41 am, line wrote:
Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. *Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). *The current date fills the
cell, but then changes the next day because of the internal clock.


Ideas?


CopyPaste SpecialValues
That will keep it fixed to that date, but it eliminates the formula
for the range you have replaced.


Do you want the Date to appear in the same column, or can it appear in
another column? If another, then you can capture on the Date column,
if blank, AND if A2801000000000 Then Now
Sub Dater()

Dim MyCell As Range

For Each MyCell In Range("A:A")
If MyCell.Value "5" Then
If MyCell.Offset(0, 1).Value = "" Then
MyCell.Offset(0, 1).Value = Now()
End If
End If
Next

End Sub

That will give you the current date/Time in the next column.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default macro to make current date remain fixed

On Jul 31, 12:57*pm, wrote:
On Jul 31, 12:34*pm, line wrote:



Thank you sbi, I know about the copy paste special and that's why I'd like to
know if anyone has a macro idea to get around the copy paste special.


" wrote:
On Jul 31, 11:41 am, line wrote:
Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. *Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). *The current date fills the
cell, but then changes the next day because of the internal clock.


Ideas?


CopyPaste SpecialValues
That will keep it fixed to that date, but it eliminates the formula
for the range you have replaced.


Do you want the Date to appear in the same column, or can it appear in
another column? If another, then you can capture on the Date column,
if blank, AND if A2801000000000 Then Now
Sub Dater()

Dim MyCell As Range

For Each MyCell In Range("A:A")
* * * If MyCell.Value "5" Then
* * * * * * * * * If MyCell.Offset(0, 1).Value = "" Then
* * * * * * * * * * * * MyCell.Offset(0, 1).Value = Now()
* * * * * * * * * End If
* * * * End If
Next

End Sub

That will give you the current date/Time in the next column.


Just change the line
If MyCell.Value "5" Then

to
If MyCell.Value "801000000000" Then


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default macro to make current date remain fixed

Hi,

Got this from the help file:

To insert the current date, press CTRL+; (semi-colon).
To insert the current time, press CTRL+SHIFT+; (semi-colon).
to insert the current date and time, press CTRL+; (semi-colon), then press
SPACE, and then press CTRL+SHIFT+; (semi-colon).

Sammy

"line" wrote:

Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). The current date fills the
cell, but then changes the next day because of the internal clock.

Ideas?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default macro to make current date remain fixed

nevermind...i forgot which group i was in.

"sammy" wrote:

Hi,

Got this from the help file:

To insert the current date, press CTRL+; (semi-colon).
To insert the current time, press CTRL+SHIFT+; (semi-colon).
to insert the current date and time, press CTRL+; (semi-colon), then press
SPACE, and then press CTRL+SHIFT+; (semi-colon).

Sammy

"line" wrote:

Hi,
I want to insert a current date into a cell, but then to have that date
remain fixed. Basically, Im using an IF function to create a date in a cell
along the lines of IF(A2801000000000,NOW()). The current date fills the
cell, but then changes the next day because of the internal clock.

Ideas?

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
Macro to create date when sheet opens and then remain static when paankadu Excel Worksheet Functions 2 November 5th 09 01:24 AM
How to make the current date appear when i click 'enter' in a cell Matt_07 Excel Worksheet Functions 1 January 30th 07 09:32 AM
Calculate current date from fixed time? mandg Excel Worksheet Functions 2 June 1st 06 03:26 PM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
How to make drop-down list of dates start with current date? Jan Buckley Excel Discussion (Misc queries) 15 August 29th 05 09:54 PM


All times are GMT +1. The time now is 09:57 PM.

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"