Right click on the sheet tab where the entry is being made and select view
code:
Private Sub Worksheet_Change(ByVal Target As Range)
If target.Column = 1 and Target.Row 2 then
With Worksheets("Sheet2")
res = Application.Countif(.Columns(1),Target.value)
if res 0 then
msgbox "This is a duplicate of an entry in Sheet2"
end if
End with
End if
End Sub
--
Regards,
Tom Ogilvy
"TheLeafs" wrote:
Good day,
I was wondering if the data validation works in terms of duplicates
across multiple tabs. I.E If the user enters the Unique ID in column A
on Sheet1 but the SSN is already entered in column A on Sheet2, but I
just wanted a warning to Appear letting the user know it exists
elsewhere in the file. I assume I would have to do this in vba but not
really sure how I could start it.
Thanks
Chris
--
TheLeafs
------------------------------------------------------------------------
TheLeafs's Profile: http://www.excelforum.com/member.php...o&userid=10131
View this thread: http://www.excelforum.com/showthread...hreadid=545522