Change event help
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
On Error GoTo ErrHandler
If Target.Column = 1 Or Target.Column = 2 Then
Application.EnableEvents = False
set rng = Cells(1, 3).Resize(1, 5)
rng.copy cells(Target.row,3)
End If
ErrHandler:
Application.EnableEvents = True
End Sub
--
Regards,
Tom Ogilvy
"Jimbola" wrote in message
...
Hi there,
I want to create a change event macro that when a change
is made to the first 2 cells in a row, a formula is copied
from the very first row into the next 5 cells of the row
where the change was made.
Hope the layout below makes sense, f1 - f5 represent
formulas.
a b c d e f g
1 Name Rate f1 f2 f3 f4 f5
.
.
.
30 john 12.50 (copy formulas f1 - f5 down here on
change)
Any help would be grately appreciated.
Regards
J
|