Hi Tonyyy,
Thanks for your help,
I have actually made a code in excel worksheet. but the unique values cant seem to automatically update it self in the summary worksheet. It only copies the values when i click on unique value cell in the months.
Do you know why it does not update automatically?
My code in the month worksheet:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">Private Sub Worksheet_SelectionChange(ByVal target As Range)
If target.Column = 9 Then
fabric = ActiveCell.Value
Module4.ChkFabric (fabric)
End If
End Sub</code>I have used a module to copy to the summary worksheet
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">Sub ChkFabric(ByRef fabric As String)
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
End With
With ResC
Set Rng = .Find(what:=Trim(fabric), LookIn:=xlValues, lookat:=xlWhole,
searchorder:=xlByRows, searchdirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Else
PrePlan.Cells(endrow + 1, 1) = fabric
End If
End With
End Sub</code></code></pre>