Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a date that will not change
If a cell returns a certain value, can a date be made to appear in an
adjacent cell that will not change even if the first cell's value does change with time. For example, if cell A1=1, then B1 shows the date A1=1, even though A1 will eventually excede the value of 1 (therefore A1=1). I need a date macro that will show only the first date A1=0. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a date that will not change
The macro in Worksheet code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("A1").Value = 1 And Range("B1").Value = "" Then Range("B1").Value = Format(Now, "mm/dd/yyyy") End If End Sub waits until A1 = 1 It then sets the current date in B1. Once a date has been entered in B1 the macro will not change it. -- Gary's Student " wrote: If a cell returns a certain value, can a date be made to appear in an adjacent cell that will not change even if the first cell's value does change with time. For example, if cell A1=1, then B1 shows the date A1=1, even though A1 will eventually excede the value of 1 (therefore A1=1). I need a date macro that will show only the first date A1=0. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a date that will not change
Thanks so much for the Christmas present. It works as expected.
Michael Gary''s Student wrote: The macro in Worksheet code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("A1").Value = 1 And Range("B1").Value = "" Then Range("B1").Value = Format(Now, "mm/dd/yyyy") End If End Sub waits until A1 = 1 It then sets the current date in B1. Once a date has been entered in B1 the macro will not change it. -- Gary's Student " wrote: If a cell returns a certain value, can a date be made to appear in an adjacent cell that will not change even if the first cell's value does change with time. For example, if cell A1=1, then B1 shows the date A1=1, even though A1 will eventually excede the value of 1 (therefore A1=1). I need a date macro that will show only the first date A1=0. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Create vertical line to indicate date on chart with series of date | Charts and Charting in Excel | |||
Create a formula in a date range to locate a specific date - ecel | Excel Discussion (Misc queries) | |||
Create a date that will not change | Excel Discussion (Misc queries) | |||
Use date modified to change format & create filter to track change | Excel Worksheet Functions |