ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I prevent duplicate data in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/51162-how-do-i-prevent-duplicate-data-excel.html)

PANKAJ KUMAR

How do I prevent duplicate data in Excel?
 
I want to make a row which can't accept a duplicate entry ( jst as MS-Access
Primary Key Field).
Please suggest, as its urgent.

Thanks & regards

Pankaj
IS Executive
DTDC Courier & Cargo Ltd.
New Delhi
Mob. 9313003826
Phone:- 011-51514148, 51514197 Extn. 23

neopolitan

How do I prevent duplicate data in Excel?
 

If you are entering data in one row across several columns and you want
to prevent duplicates from being entered in that one row (Assume Row 2
for this example):

Select the row, then click on DataValidation and select "Custom" in
the dropdown list in the "Settings" tab. Then enter this formula in
the "Formula" window: =COUNTIF(2:2,A$2)<=1 .

Now an error message pops up whenever the user attempts to enter the
same data twice in Row 2.

If you want to prevent duplicates in a column (Assume Col A) instead
of a row then the formula to enter is: =COUNTIF(A:A,$A1)<=1 .


--
neopolitan


------------------------------------------------------------------------
neopolitan's Profile: http://www.excelforum.com/member.php...nfo&userid=611
View this thread: http://www.excelforum.com/showthread...hreadid=477458


Jim Rech

How do I prevent duplicate data in Excel?
 
Trying to make Excel work like Access or any other application can be a
challenge but you might try this:

Say you require that every entry in column A be unique. Select all of
column A by clicking the column A heading. Make sure that cell A1 is the
active cell. Then do a Data, Validation and pick Custom as the Allow type.
In the formula box enter: =COUNTIF(A:A,A1)=1

Customize the Alert tab to show the user a helpful error message.


--
Jim
"PANKAJ KUMAR" <PANKAJ wrote in message
...
|I want to make a row which can't accept a duplicate entry ( jst as
MS-Access
| Primary Key Field).
| Please suggest, as its urgent.
|
| Thanks & regards
|
| Pankaj
| IS Executive
| DTDC Courier & Cargo Ltd.
| New Delhi
| Mob. 9313003826
| Phone:- 011-51514148, 51514197 Extn. 23



Dave Peterson

How do I prevent duplicate data in Excel?
 
You may want to read some of Chip Pearson's techniques for dealing with
duplicates:
http://www.cpearson.com/excel/duplicat.htm

Visit Chip Pearson's site for a Data|validation solution:
http://www.cpearson.com/excel/NoDupEntry.htm


PANKAJ KUMAR wrote:

I want to make a row which can't accept a duplicate entry ( jst as MS-Access
Primary Key Field).
Please suggest, as its urgent.

Thanks & regards

Pankaj
IS Executive
DTDC Courier & Cargo Ltd.
New Delhi
Mob. 9313003826
Phone:- 011-51514148, 51514197 Extn. 23


--

Dave Peterson


All times are GMT +1. The time now is 01:17 AM.

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