Hi everyone,


Thanks for taking the time to read my post, I have little to no knowledge on how to code in VBA..


I have a code now that whenever change is detected in Column A, there will be a InputBox to ask for search value from the user.
Is it possible to change it so that instead of a InputBox asking for the search value, the search value is taken from the last cell in Column A immediately after change is detected?


Current code as shown :
Private Sub Worksheet_Change(ByVal Target As Range)
Dim FindString As String
Dim Rng As Range
If Target.Column = 1 Then
FindString = InputBox("Enter a Search value")
If Trim(FindString) <> "" Then
    With Sheets("Sheet1").Range("A:A") 'searches all of column A
        Set Rng = .Find(What:=FindString, _
                        After:=.Cells(.Cells.Count), _
                        LookIn:=xlValues, _
                        LookAt:=xlWhole, _
                        SearchOrder:=xlByRows, _
                        SearchDirection:=xlNext, _
                        MatchCase:=False)
        If Not Rng Is Nothing Then
            MsgBox "Duplicate found"
            Application.Goto Rng, True 'value found
        Else


        End If
    End With
End If
End If


End Sub