Hi everyone..
How to list relevent data when we click into the specific link? Please refer attachment for more understanding.Actually, this coding is already successfully run but it only display the latest data and not all data. Below are my coding.
Sheets("Database").Unprotect Password:=""
With Sheets("MasterList")
.Unprotect Password:=""
.Boxa = Target.TextToDisplay
.Visible = True
Dim sht1 As Worksheet
Dim FindString As String, FirstAddress As String
Dim Rng As Range
Set sht1 = Sheets("MasterList")
Application.ScreenUpdating = False
Sheets("MasterList").Range("A7:L165536").ClearContents
sht1.Activate
Set sht1 = Nothing
MyArr = Array(Sheets("Database"))
FindString = Target.TextToDisplay
If Trim(FindString) <> "" Then
With Sheets("Database").Range("A:L")
For I = LBound(MyArr) To UBound(MyArr)
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Rng Is Nothing Then
MsgBox "Data Not Found"
Else
FindString = Rng
FirstAddress = Rng.Address
Do
Rng.EntireRow.Copy
Sheets("MasterList").[A165536].End(xlUp)(7).PasteSpecial Paste:=xlValues
Application.Selection.HorizontalAlignment = xlCenter
Set Rng = .FindNext(Rng)
Loop While Not Rng Is Nothing And Rng.Address <> FirstAddress
End If
Next I
End With
Application.ScreenUpdating = True
End If
End With
Sheets("MasterList").Protect Password:=""
Sheets("Database").Protect Password:=""
End Sub
Bookmarks