ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   need an error msge when I attempt to enter a duplicate value in a (https://www.excelbanter.com/excel-discussion-misc-queries/30117-need-error-msge-when-i-attempt-enter-duplicate-value.html)

pg23673

need an error msge when I attempt to enter a duplicate value in a
 
I am entering unique serial no. in col A. Can I set up a rule which will not
allow a duplicate serial no. entry into another cell?

JE McGimpsey

See

http://cpearson.com/excel/NoDupEntry.htm

In article ,
"pg23673" wrote:

I am entering unique serial no. in col A. Can I set up a rule which will not
allow a duplicate serial no. entry into another cell?


bj

Check out the validation in the Data section.
select the area of interest (A:A)
<data<validation<Settings<Custom
enter =countif(A:A,A1)=1

Set the error alert as you want it


"pg23673" wrote:

I am entering unique serial no. in col A. Can I set up a rule which will not
allow a duplicate serial no. entry into another cell?


Gary Brown


If you put a Custom Data Validation as follows:-

=IF(MATCH(A1,A:A,0)<ROW(A1),FALSE,TRUE)

This assumes that you are putting the serial number in column A, adjust
accordingly if this is not the case


--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084
View this thread: http://www.excelforum.com/showthread...hreadid=378030


Dave Peterson

Chip Pearson has something that can help:
http://www.cpearson.com/excel/NoDupEntry.htm



pg23673 wrote:

I am entering unique serial no. in col A. Can I set up a rule which will not
allow a duplicate serial no. entry into another cell?


--

Dave Peterson

pg23673

Thanks for the help guys.

"Gary Brown" wrote:


If you put a Custom Data Validation as follows:-

=IF(MATCH(A1,A:A,0)<ROW(A1),FALSE,TRUE)

This assumes that you are putting the serial number in column A, adjust
accordingly if this is not the case


--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084
View this thread: http://www.excelforum.com/showthread...hreadid=378030




All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com