Blocking Duplicate entries in excel table with data validation

JeremyHill

New Member
Joined
Apr 18, 2018
Messages
3
Hi All,

I am very new to this forum but using excel for a while. I've reading through some of the threads referring to my title but not exactly what I am looking for.
I even tried the online tutorials with no success. I think I'm doing something wrong.


exceldata%20valid.png.html
http://s52.photobucket.com/user/PokemonGT/media/exceldata valid.png.html

The table I created has headers and the criteria header is "Job No."
As previously mentioned I have tried the data validation procedure with no success.

Please help.

Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I don't click on links, so I have not seen what you posted at photobucket. I'm sure some of the local Excel Gurus will be around shortly...but this is what I use to prevent Dupes in my Spreadsheets:

Code:
    If Target.Cells.Count > 1 Or IsEmpty(Target(1, 1)) Then Exit Sub 
     
    If Not  Intersect(Target, Range("A2:A1000")) Is Nothing Then 
        If WorksheetFunction. CountIf(Range("A2:A1000"), Target) > 1 Then 
             MsgBox Target & " Already exists" 
            Application.EnableEvents = False 
            Application.Undo 
            Application.EnableEvents = True 
        End If 
    End If
 
Upvote 0
I don't click on links, so I have not seen what you posted at photobucket. I'm sure some of the local Excel Gurus will be around shortly...but this is what I use to prevent Dupes in my Spreadsheets:

Code:
    If Target.Cells.Count > 1 Or IsEmpty(Target(1, 1)) Then Exit Sub 
     
    If Not  Intersect(Target, Range("A2:A1000")) Is Nothing Then 
        If WorksheetFunction. CountIf(Range("A2:A1000"), Target) > 1 Then 
             MsgBox Target & " Already exists" 
            Application.EnableEvents = False 
            Application.Undo 
            Application.EnableEvents = True 
        End If 
    End If

Hi blbat,

i pasted the code in the worksheet and changed the coding to look at the range of cells but no positive result. i'm trying to upload a screenshot of my sheet but having difficulty doing so.
Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top