Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put the following in the code module for the worksheet. You said Col H
is filled in as a result of entry in another column. If so, you will need to change the 2nd half to use the appropriate column/offsets. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 7 Then 'col G Target.Offset(0, -6) = DateAdd("m", 1, Target) End If If Target.Column = 8 Then 'col H If IsEmpty(Target.Offset(0, -1)) Then Target.Offset(0, -7) = DateAdd("yyyy", 1, Target) Else Target.Offset(0, -7) = DateAdd("m", 1, Target.Offset(0, -1)) End If End If End Sub Hth, Merjet |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dates in different formats | Excel Discussion (Misc queries) | |||
Dates in different formats | Excel Discussion (Misc queries) | |||
dates and formats | New Users to Excel | |||
Macro behaves differently then when recorded and stuffs dates (or date formats) | Excel Programming | |||
Excel Addin altering date format on text file import | Excel Programming |