I have used the find method to compare two columns (A and B)in different sheets. column A is the updated column while column B is the copied column.the code will loop through and columns and find for match cases. If there is a unique value in column A, it will copy it to column B. I have managed to code it but the unique value does not automatically appear in column B. Only when i click on the unique value cell of column A would it then be copied into column B.
Does anyone know why it cannot update automatically?

Code in column A:
PrivateSub Worksheet_SelectionChange(ByVal target As Range)
If target.Column =9Then
fabric = ActiveCell.Value
Module4.ChkFabric (fabric)
EndIf

EndSub


I have used a module to copy to column B:


Sub ChkFabric(ByRef fabric AsString)
Dim Rng, TgtC, ResC As Range
Dim PrePlan As Worksheet

Set PrePlan = Worksheets("Pre Master Plan")

With PrePlan
Set ResC =.Range("A:A")
endrow =.Cells(PrePlan.Rows.Count,"A").End(xlUp).Row
EndWith
With ResC
Set Rng =.Find(what:=Trim(fabric), LookIn:=xlValues, lookat:=xlWhole,
searchorder:=xlByRows, searchdirection:=xlNext, _
MatchCase:=False)
IfNot Rng IsNothingThen


Else
PrePlan.Cells(endrow +1,1)= fabric
EndIf
EndWith


EndSub