Hi Bill,
Please copy the below routine in the worksheet module of the worksheet where you are pasting the information - you will need to correct the name of the second worksheet (target for copy) and the cells being monitored (pasted into) and being copied
Private Sub Worksheet_Change(ByVal Target As Range)
'#
'# delare private variables
'#
Dim pvt_obj_MonitoringRange As Excel.Range
Dim pvt_obj_FindRange As Excel.Range
'#
'# set the range to monitor to consist of the cells that are being changed by the paste operation which
'# should trigger the copy action - additional cells to be monitoreed should be added to the below statement
'# as the range object is also used to clear the appropriate fields on worksheet 1
'#
Set pvt_obj_MonitoringRange = Union(Range("C9"), Range("B3"), Range("G8"), Range("G9"), Range("F3"))
'#
'# check if one or more cells have changed that are part of the range to monitor - if so start the
'# process of copying data
'#
If Not Intersect(Target, pvt_obj_MonitoringRange) Is Nothing Then
'#
'# attempt to find the row on worksheet 2 where the value in column A equals the value entered/pasted
'# in cell C9 on this worksheet
'#
Set pvt_obj_FindRange = ThisWorkbook.Worksheets("Sheet2").Columns("A").Find(Target.Parent.Range("C9").Value)
If pvt_obj_FindRange Is Nothing Then
MsgBox "Unable to find argument " & Target.Parent.Range("C9").Value, vbCritical, "Not found"
Exit Sub
End If
'#
'# update the data on the second worksheet - the column offset refers to column A where the search was
'# conducted - so offset value 1 = column B, value 2 - column C etc
'#
With pvt_obj_FindRange
.Offset(0, 1).Value = Target.Parent.Range("B3").Value '# writes value B3 to B column on worksheet 2
.Offset(0, 2).Value = Target.Parent.Range("G8").Value '# writes value G8 to C column on worksheet 2
.Offset(0, 3).Value = Target.Parent.Range("G9").Value '# writes value G9 to D column on worksheet 2
.Offset(0, 4).Value = Target.Parent.Range("F3").Value '# writes value F3 to E column on worksheet 2
End With
'#
'# clear the fields that are part of the monitoring range - disable the Excel event model to avoid
'# this action from triggering this routine itself again
'#
Application.EnableEvents = False
pvt_obj_MonitoringRange.ClearContents
Application.EnableEvents = True
End If
End Sub
Bookmarks