Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to create date when sheet opens and then remain static when | Excel Worksheet Functions | |||
How to make the current date appear when i click 'enter' in a cell | Excel Worksheet Functions | |||
Calculate current date from fixed time? | Excel Worksheet Functions | |||
Make date change in excel to current date when opening daily? | Excel Discussion (Misc queries) | |||
How to make drop-down list of dates start with current date? | Excel Discussion (Misc queries) |