PREVENT DUPLICATION FIND

NIKHILSP

New Member
Joined
Aug 23, 2022
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
PREVENT DUPLICATION FIND K column
RT Request & Film Wrapper (1) (2).xlsx
ABCDEFGHIJK
1DateDraw No:Sketch No:Dia:Thickness:Weld No:Spool No:Welder ID:Weld Process:Column1Column2
218.08.2022T83-CDS-11493-008-SP051CA2P016''7.11 mmSW09 RS290011-60-03278B71GTAW (LTCS)T83-CDS-11493-008-SP051CA2P0167.11SW09 RS290011-60-03278T83-CDS-11493-008-SP051CA2P0167.11SW09 RS290011-60-03278
318.08.2022T72-CHS-20393-003-SP031CS2W0116''9.53 mmSW08 RS290011-00-04813M20+P1GTAW+GMAW (CS)T72-CHS-20393-003-SP031CS2W01169.53SW08 RS290011-00-04813T72-CHS-20393-003-SP031CS2W01169.53SW08 RS290011-00-04813
418.08.2022T83-CDS-11493-008-SP051CA2P016''7.11 mmSW09 RS290011-60-03278B71GTAW (LTCS)T83-CDS-11493-008-SP051CA2P0167.11SW09 RS290011-60-03278T83-CDS-11493-008-SP051CA2P0167.11SW09 RS290011-60-03278
RT Request
Cell Formulas
RangeFormula
J2:J4J2=CONCATENATE(B2,C2,D2,E2,F2,G2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K:KCell ValueduplicatestextNO
K4Cell ValueduplicatestextNO
K1:K3,K5:K1048576Cell ValueduplicatestextNO
Cells with Data Validation
CellAllowCriteria
J2:J4Custom=COUNTIF($J$2:$J$3,J2)=1
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the Board!

This link shows you how you can use Data Validation to prevent duplicate entries in a column.
 
Upvote 0
Hey Joe
I was watching this thread hoping for a reply. Unfortunately that won't work for the OP given the validation rule is in a cell that concatenates values from 5 other cells. There is no data input directly into the cell that is being tested. I thought I had a solution using helper columns by concatenating the first 4 columns and then determining what the 5th value could not be - data validation is applied to the 5th data input column to avoid duplication of the 5 concatenated values. But then I realised I was only testing the first instance of potential duplication and not all possible instances (I was using semi-fixed ranges with a match function). The issue that needs to be solved for DV is basically running a text concat function inside an array formula which I think cannot be solved using native formulas in Excel 2010. I found a work around but it is very clunky and contains a number of assumptions. Any ideas?
Cheers
 
Upvote 0
Perhaps as the cells B:G make up the value of J we could use a Worksheet_Change event to capture the duplicate as it is created. We could then report that to the user and then undo the last action to remove the created duplicate.

Example code below:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Not Intersect(Target, Range("B2:G" & Range("A" & Rows.Count).End(xlUp).Row)) Is Nothing Then
        If Application.CountIf(Range("J:J"), Range("J" & Target.Row).Value) > 1 Then
            MsgBox "The last entry created a duplicate in column J"
            Application.Undo
            GoTo jump
        End If
    End If
jump:
    Application.EnableEvents = True
End Sub
 
Upvote 0
Hey Joe
I was watching this thread hoping for a reply. Unfortunately that won't work for the OP given the validation rule is in a cell that concatenates values from 5 other cells. There is no data input directly into the cell that is being tested. I thought I had a solution using helper columns by concatenating the first 4 columns and then determining what the 5th value could not be - data validation is applied to the 5th data input column to avoid duplication of the 5 concatenated values. But then I realised I was only testing the first instance of potential duplication and not all possible instances (I was using semi-fixed ranges with a match function). The issue that needs to be solved for DV is basically running a text concat function inside an array formula which I think cannot be solved using native formulas in Excel 2010. I found a work around but it is very clunky and contains a number of assumptions. Any ideas?
Cheers
Perhaps I am not understanding something about the question, or you are seeing something that I am not (there was not much explanation in the original question).
I see that column J is a concatenation of 5 columns, but they appear to be asking about column K, not J.
I do not see any formulas in column K, so I assumed that column was being hard-coded.
If it is a formula, I would need to see what that formula is.
 
Upvote 0
I had assumed that column K was just put there as a value version of J to show the duplicates. I am unsure now.
 
Upvote 0
I had assumed that column K was just put there as a value version of J to show the duplicates. I am unsure now.
That is a possibility, though then I would have expected them to say:
PREVENT DUPLICATION FIND J column
instead of:
PREVENT DUPLICATION FIND K column

That is the problem with vague requests without much explanation. Too much is left up to the person to assume, and people can have different interpretations.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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