i got 2 macro`s that i dont know how to run togheter.. The first macro is just posting date when i write something in column A and posting it in Column b. the sekund mocro is copying Cell F and posting it in Cell G
the first macro is
This under here is the 2 one
the first macro is
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
'disable events to stop changes made by this macro re-trigering it
Application.EnableEvents = False
'test if changed cell is a number
If IsNumeric(Target.Value) Then
'only add a date if no date in column I
If Not IsDate(Range("B" & Target.Row).Value) Then
Range("b" & Target.Row).Value = Format(Date, "YYYYDDMM")
End If
End If
're-enable events
Application.EnableEvents = True
End If
Exit Sub
'error handler
ErrHnd:
Err.Clear
're-enable events
Application.EnableEvents = True
End Sub
This under here is the 2 one
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Column = 1 Then
Target.Offset(, 6).Value = Target.Offset(, 5).Value
End If
End Sub
Last edited by a moderator: