PDA

View Full Version : [SOLVED] Search Cell values after change in second Sheet



Emoncada
08-31-2015, 06:34 AM
I have Sheet1 and Sheet2.
I would like to have the Column A in sheet1 as the target. So after the user enters data in that column it would search for that value in Sheet2

It would search for that value in Sheet2 Column A also. I

f it finds a match it would let the user know


MsgBox "Ticket Already Exists."

Else
Do Nothing

Any help would be great.

Emoncada
08-31-2015, 07:03 AM
I was able to find this and modified it a little and it works, hopefully this helps someone else


If Not tChange Is Nothing Then
Application.EnableEvents = False
For Each tCell In tChange
If tCell > "" Then
Set Found = wd.Range("A2:A60000").Find(tChange, LookIn:=xlValues)

If Not Found Is Nothing Then

FDate = Found.Offset(0, 2).Value

MsgBox "Ticket Previosly Entered on "& FDate & "." & vbNewLine & "Please Check Ticket Number Again.", vbOKOnly, "Ticket Exists"
Else

End If
End If

Next

End If