Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Restrict a column to allow only unique entries?

I have an Excel table linked to Access. I would like to
restrict one column to require entries to be unique. Does
anybody have any experience?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Restrict a column to allow only unique entries?

In Cell A1: Data Validation. Custom.
=COUNTIF($A$1:$A$1000,A1)=1

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Gabe" wrote in message
...
I have an Excel table linked to Access. I would like to
restrict one column to require entries to be unique. Does
anybody have any experience?



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Restrict a column to allow only unique entries?

Thanks Rob,
Does this go in the first cell of the column or somewhere
else?
-----Original Message-----
In Cell A1: Data Validation. Custom.
=COUNTIF($A$1:$A$1000,A1)=1

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Gabe" wrote in message
...
I have an Excel table linked to Access. I would like to
restrict one column to require entries to be unique.

Does
anybody have any experience?



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Restrict a column to allow only unique entries?

Hi
highlight/select all cells for which you want to apply this validation.
Then enter
=COUNTIF($A$1:$A$1000,A1)=1
you have to change the following according to your needs:
1. The first paramenter of COUNTIF ($A$1:$A$1000) reflecting your
selected range
2. The second parameter (A1) to the fuppermost cell of your selection

The formula is entered in the data validation dialog (goto 'Data -
Validation' and choose formula as category)

Frank

wrote:
Thanks Rob,
Does this go in the first cell of the column or somewhere
else?
-----Original Message-----
In Cell A1: Data Validation. Custom.
=COUNTIF($A$1:$A$1000,A1)=1

--
Rob van Gelder -
http://www.vangelder.co.nz/excel


"Gabe" wrote in message
...
I have an Excel table linked to Access. I would like to
restrict one column to require entries to be unique. Does
anybody have any experience?



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Restrict a column to allow only unique entries?

....HOWEVER, the data validation has no effect when a worksheet value
is inserted/updated within MS Access via the link.

--

"Frank Kabel" wrote in message ...
Hi
highlight/select all cells for which you want to apply this validation.
Then enter
=COUNTIF($A$1:$A$1000,A1)=1
you have to change the following according to your needs:
1. The first paramenter of COUNTIF ($A$1:$A$1000) reflecting your
selected range
2. The second parameter (A1) to the fuppermost cell of your selection

The formula is entered in the data validation dialog (goto 'Data -
Validation' and choose formula as category)

Frank

wrote:
Thanks Rob,
Does this go in the first cell of the column or somewhere
else?
-----Original Message-----
In Cell A1: Data Validation. Custom.
=COUNTIF($A$1:$A$1000,A1)=1

--
Rob van Gelder -
http://www.vangelder.co.nz/excel


"Gabe" wrote in message
...
I have an Excel table linked to Access. I would like to
restrict one column to require entries to be unique. Does
anybody have any experience?


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Restrict a column to allow only unique entries?

Just to add (since there is often a misunderstanding of this), this will
only restrict someone manually editing a value in the cell. It will not
affect existing valuesin the cells, values produced by formulas or values
placed by code. Also, data validation is treated as a format, so someone
pasting into the cell will remove the validation.

--
Regards,
Tom Ogilvy

"Frank Kabel" wrote in message
...
Hi
highlight/select all cells for which you want to apply this validation.
Then enter
=COUNTIF($A$1:$A$1000,A1)=1
you have to change the following according to your needs:
1. The first paramenter of COUNTIF ($A$1:$A$1000) reflecting your
selected range
2. The second parameter (A1) to the fuppermost cell of your selection

The formula is entered in the data validation dialog (goto 'Data -
Validation' and choose formula as category)

Frank

wrote:
Thanks Rob,
Does this go in the first cell of the column or somewhere
else?
-----Original Message-----
In Cell A1: Data Validation. Custom.
=COUNTIF($A$1:$A$1000,A1)=1

--
Rob van Gelder -
http://www.vangelder.co.nz/excel


"Gabe" wrote in message
...
I have an Excel table linked to Access. I would like to
restrict one column to require entries to be unique. Does
anybody have any experience?


.





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Restrict a column to allow only unique entries?

Thanks Everybody,
I really need something that will work when I'm cutting
and pasting many values at a time to warn me if there is
duplication. Is there a way to do that? Gabe
-----Original Message-----
....HOWEVER, the data validation has no effect when a

worksheet value
is inserted/updated within MS Access via the link.

--

"Frank Kabel" wrote in message

...
Hi
highlight/select all cells for which you want to apply

this validation.
Then enter
=COUNTIF($A$1:$A$1000,A1)=1
you have to change the following according to your

needs:
1. The first paramenter of COUNTIF ($A$1:$A$1000)

reflecting your
selected range
2. The second parameter (A1) to the fuppermost cell of

your selection

The formula is entered in the data validation dialog

(goto 'Data -
Validation' and choose formula as category)

Frank

wrote:
Thanks Rob,
Does this go in the first cell of the column or

somewhere
else?
-----Original Message-----
In Cell A1: Data Validation. Custom.
=COUNTIF($A$1:$A$1000,A1)=1

--
Rob van Gelder -
http://www.vangelder.co.nz/excel


"Gabe" wrote in message
...
I have an Excel table linked to Access. I would

like to
restrict one column to require entries to be

unique. Does
anybody have any experience?


.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count the unique entries in a column of data Remacricky Excel Discussion (Misc queries) 3 September 18th 07 02:42 PM
Extract Unique entries in a column Jeff Excel Worksheet Functions 4 October 18th 05 08:04 PM
set up a column in excel with unique entries Richard Excel Discussion (Misc queries) 2 March 6th 05 08:15 PM
How do I return the unique entries from a column to a listbox Dave Mc Excel Worksheet Functions 4 February 9th 05 08:02 AM
Restrict cell value to unique value within column. Hobbieman Excel Programming 4 August 31st 03 08:16 PM


All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"