Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Store calculated date as a literal value
I want to calculate a date and store it as a literal in a cell so that it is
not updated each time the worksheet is updated. I want the previous Month and current Year from when the worksheet is created to be stored in a cell so that I can use it in charts. I don't what it to be updated if the worksheet is opened up at a future date. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Store calculated date as a literal value
I'm guessing that your dates are calculated by a Marco, and you want the
macro to run only if it hasn't before.... so you could test that the target cells are empty and if they are write out todays month - 1 month write out todays year msg box to says it's happened (else "do nothing" is implied) Sub mydate() If Cells(3, 2) = "" Then Cells(3, 2) = Month(Date) - 1 Cells(3, 3) = Year(Date) MsgBox "date done" End If End Sub hope that helps, "Mike Hann" wrote: I want to calculate a date and store it as a literal in a cell so that it is not updated each time the worksheet is updated. I want the previous Month and current Year from when the worksheet is created to be stored in a cell so that I can use it in charts. I don't what it to be updated if the worksheet is opened up at a future date. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
STORE THE DATE & TIME THE VALUE HAS CHANGED IN A CELL | Excel Discussion (Misc queries) | |||
How to store the calculated value into the original cell? | Excel Worksheet Functions | |||
store inventory sheet(ex:sports equipment store) | Excel Worksheet Functions | |||
Pull and store a value on specific date in another cell | Excel Worksheet Functions | |||
store file saved date in cell | Excel Worksheet Functions |