Using frequency in a data validation formula to ensure unique entries

Rkeev

Board Regular
Joined
Mar 11, 2014
Messages
69
Using frequency in a data validation formula for ensuring unique entries.


Currently I use COUNTIF($B$2:$B$244,B2)<=1 or ISNA(VLOOKUP(A9,A$1:A8,1,FALSE)) to ensure all entries in particular columns are unique, but I have heard how slow these functions are and that the Frequency function counts the fastest for larger spreadsheets. My spreadsheet has over 40K lines so I don’t think these other formulas will be fast enough.


I also know frequency only counts numbers, so my question: is there a way to use frequency with text items in a data validation to ensure unique entries? All items are 5 digits with 1 letter in them.


Thx,
RKeev

 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
for example, if your range would have been a1:a4 then
Code:
=OMFEL(INDEX($A$1:$A$4;MINSTA(OM(FREKVENS(PASSA($A$1:$A$4;$A$1:$A$4;0);PASSA($A$1:$A$4;$A$1:$A$4;0))>0;RAD($A$1:$A$4)-RAD($A$1)+1;"");RADER($B$1:B1)));"")
 
Upvote 0
for example, if your range would have been a1:a4 then
Code:
=OMFEL(INDEX($A$1:$A$4;MINSTA(OM(FREKVENS(PASSA($A$1:$A$4;$A$1:$A$4;0);PASSA($A$1:$A$4;$A$1:$A$4;0))>0;RAD($A$1:$A$4)-RAD($A$1)+1;"");RADER($B$1:B1)));"")

woops sorry thats in swedish

ctrl+shift+enter
Code:
=iferror(INDEX($A$1:$A$4,small(if(frequency(match($A$1:$A$4,$A$1:$A$4,0),match($A$1:$A$4,$A$1:$A$4,0))>0,row($A$1:$A$4)-row($A$1)+1,""),rows($B$1:B1))),"")
 
Upvote 0
for example, if your range would have been a1:a4 then
Code:
=OMFEL(INDEX($A$1:$A$4;MINSTA(OM(FREKVENS(PASSA($A$1:$A$4;$A$1:$A$4;0);PASSA($A$1:$A$4;$A$1:$A$4;0))>0;RAD($A$1:$A$4)-RAD($A$1)+1;"");RADER($B$1:B1)));"")

Stridan,
thanks for the quick response.

Not sure if the small-if-frequency-match function will be faster than the countif, but I'll give it a try.

Rkeev
 
Upvote 0
i think i got i wrong, my formula creates a unique validationlist, it aint checking if its unique
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

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