New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Data validation

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

Data validation

Postby Lincoln » Mon Feb 01, 2016 9:48 am

I would like to restrict user to input 3 digits (i.e 123, 513) and each input is unique, there are total of 100 observations

I have tried to put in formula =COUNTIF($B$2:$B$101,B2) =1, but I dont know how to make the "multiple validation"

Thank you in advance
  • 0

Lincoln
Rookie
 
Posts: 1
Joined: Feb 1, 2016
Reputation: 0
Excel Version: 2013

Re: Data validation

Postby ConneXionLost » Mon Feb 01, 2016 1:18 pm

In the Data Validation dialog box, choose the "Whole Number" option, then select a range "between" 100 and 999.

Cheers,
  • 0

ConneXionLost
Regular
 
Posts: 68
Joined: May 9, 2013
Location: Canada
Reputation: 19
Excel Version: 2003, 2010

Re: Data validation

Postby Beamer » Tue Feb 02, 2016 6:09 am

ConneXionLost's idea would indeed solve half your problem, but, if I'm reading your question correctly, you want to make sure that the same number can't be chosen twice.

If that is correct, then I suggest a helper column showing all numbers within your desired range that automatically removes any number that has been used. Then another column will re-list all those numbers using small to remove the blanks.
Then make the data validation use that list. (That will probably only work if it is a drop-down list).

Also, all previously used numbers would have to remain on the same sheet (to be searched for a match), if that is not the case then I think VBA will be needed.
  • 0

Beamer
Excel Junkie
 
Posts: 217
Joined: Oct 3, 2014
Location: New South Wales, Australia
Reputation: 31
Excel Version: 2010

Re: Data validation

Postby NoSparks » Tue Feb 02, 2016 8:02 am

  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Data validation

Postby pecoflyer » Tue Feb 02, 2016 9:32 am

Thread closed
  • 0

A relevant topic title helps get faster and more answers
pecoflyer
Moderator
 
Posts: 1274
Joined: Jan 24, 2012
Location: Belgium
Reputation: 39
Excel Version: 2003/2007/2010


Return to General Excel Questions

Who is online

Users browsing this forum: No registered users and 129 guests