Utradeshow
Well-known Member
- Joined
- Apr 26, 2004
- Messages
- 749
Hi Guy's I have a macro that performes this..
When Column "C" is changed it enters date in column "Y"
I would like to have it also when Column "B" is changed to put the date in Column "Z" I belive it would be a "Rng 2" thing but i can't get it.
Here is the code.
[/code]Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Calculate
Dim rng As Range
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
' Set Target Range
Set rng = Range("C1:C1000")
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
Target.Offset(, 22) = Date
If IsDate(Target) Then _
Target.Offset(, 1) = Format(Target, "mmm")
End Sub
When Column "C" is changed it enters date in column "Y"
I would like to have it also when Column "B" is changed to put the date in Column "Z" I belive it would be a "Rng 2" thing but i can't get it.
Here is the code.
[/code]Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Calculate
Dim rng As Range
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
' Set Target Range
Set rng = Range("C1:C1000")
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
Target.Offset(, 22) = Date
If IsDate(Target) Then _
Target.Offset(, 1) = Format(Target, "mmm")
End Sub