#1
|
|||
|
|||
multiple validation on a column to avoid duplicate entries
In the attached, tab 'Working'...
is there a way to:
Thank you in advance |
#2
|
||||
|
||||
Have you posted the same on other forums as you did previously?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
Fair question.
No, I am sticking to this forum only. If that's OK |
#4
|
|||
|
|||
Your unique numeric entries are entered into column A of sheet Working. And probably you have a header (a string) for this column too.
On some hidden sheet (e.g. Hidden), into some cell (e.g. A1) enter formula, which calculates next unique value, like Code:
=MAX(Working!$A:$A) +1 Code:
nNextID = Hidden!$A$1 Code:
nCurrID = Working!$A2 Create a Name (e.g lIDList), like Code:
lIDList = IF(nCurrID = "", nNextID, nCurrID) =lIDList Now, whenever you activate this Data Validation List on sheet working, when the cell has any ID value entered previously, this value is only option, and when the cell is empty, the next ID value is the option. You can also add another IF() level for lIDList, which checks is the active cell in column A, and when not, returns some error message instead ID value. |
#5
|
|||
|
|||
ArviLaanemets, I tried yours and it works! Thanks for the concept; I may have a different use for it.
Back to IAmThatGuy's question, I think you answered it perfectly. However, I'm wondering whether having to dropdown each number is just making it rather fiddly for users. Guy, I'm presuming that you are trying to make sure no numbers are skipped and no numbers are duplicated. Is there another reason you wanted to use a dropdown? I think from your example that your numbering will always be in regular sequence? This is rather simplistic compared to Arvi's elegant response, but I have an issue with a coworker's worksheet for tracking items. He wants to hide the rows of projects that are completed, but sometimes because it's hidden, he ends up re-entering it, or reusing the record number. I've applied a numbering column where the column's cells are locked, and where the numbers don't show up until he starts to type content in the next (B) column. First number cell =IF(B2="","",1) Subsequent number cells =IF(B3="","",MAX(A$2:A2)+1) The latter, when filled down, becomes =IF(B17="","",MAX(A$2:A16)+1) etc. I also apply conditional formatting to the column containing the project number, just your basic pink background/red text default one. So if he starts typing in a project that is either above, or better yet, on a hidden row, he's got a clue that he already has the information, and can check it. It doesn't prohibit him from entering it; but the next time he passes it to me to update it I can check why there are duplicates. |
#6
|
|||
|
|||
Thanks, I have tried the steps but I am still able to enter duplicate values
and enter text into the fields rather than only being allowed to select a value from the drop-down. I have attached the updated sheet. Have I gone wrong somewhere? Thanks in advance Quote:
|
#7
|
|||
|
|||
Quote:
|
#8
|
|||
|
|||
Quote:
Anyway, I haven't access to MS Office until Friday, so I can't check out your attached workbook currently. |
#9
|
|||
|
|||
Quote:
Appreciate if you are able to check? Thank you |
#10
|
|||
|
|||
shameless bump/ Any takers please?
|
#11
|
|||
|
|||
Found the solution here" VBA to auto-generate a task ID (Unique and sequenced) | MrExcel Message Board
|
Tags |
data validation, duplicate entries |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to avoid duplicate table headers while mail merge records? | everwisher | Mail Merge | 2 | 01-04-2019 04:50 AM |
Can Excel find Duplicate entries when only part of the cell's data is a duplicate of another cell? | jsisley | Excel | 1 | 07-21-2017 09:20 AM |
Duplicate entries | yourforester | Outlook | 1 | 11-15-2014 10:44 PM |
Calendar - Duplicate Entries | castow | Outlook | 0 | 02-05-2014 02:53 PM |
How Can I Flag Duplicate Date Entries? | tatihulot | Excel | 5 | 11-16-2012 12:19 AM |