Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Raj Mazumdar
 
Posts: n/a
Default Warning while entering duplicate values in a cell

Hi there guys

Was just wondering - is there a way to get a warning message pop up (or any
kind of warning) if a value is entered in a cell that already exists in
another cell in that column earlier/later? This will enable me to eliminate
entering duplicate values in a cell in a particular column...

Thanks muchly.

Raj
  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Warning while entering duplicate values in a cell

You can use Data Validation to prevent entry of duplicate values.

Select your column (I'll use Column A for this example)
From the Data Menu, select "Validation"
In the Allow field, select "Custom"
Enter the formula: =COUNTIF(A:A,A1)=1

You can also set custom messages to display if duplicates are entered.

Note, this will only prevent manual entry of data from being duplicated. It
will not find existing duplicates or prevent Copy/Pasting duplicate data.

Another option would be to use Conditional Formatting to highlight cells
that contain duplicates. This would allow you to find existing duplicates
and catch Copy/Pasted data. The same formula above could be used there with
one little change. =COUNTIF(A:A,A1)1

HTH,
Elkar



"Raj Mazumdar" wrote:

Hi there guys

Was just wondering - is there a way to get a warning message pop up (or any
kind of warning) if a value is entered in a cell that already exists in
another cell in that column earlier/later? This will enable me to eliminate
entering duplicate values in a cell in a particular column...

Thanks muchly.

Raj

  #3   Report Post  
Posted to microsoft.public.excel.misc
Raj Mazumdar
 
Posts: n/a
Default Warning while entering duplicate values in a cell

Thanks Elkar...

"Elkar" wrote:

You can use Data Validation to prevent entry of duplicate values.

Select your column (I'll use Column A for this example)
From the Data Menu, select "Validation"
In the Allow field, select "Custom"
Enter the formula: =COUNTIF(A:A,A1)=1

You can also set custom messages to display if duplicates are entered.

Note, this will only prevent manual entry of data from being duplicated. It
will not find existing duplicates or prevent Copy/Pasting duplicate data.

Another option would be to use Conditional Formatting to highlight cells
that contain duplicates. This would allow you to find existing duplicates
and catch Copy/Pasted data. The same formula above could be used there with
one little change. =COUNTIF(A:A,A1)1

HTH,
Elkar



"Raj Mazumdar" wrote:

Hi there guys

Was just wondering - is there a way to get a warning message pop up (or any
kind of warning) if a value is entered in a cell that already exists in
another cell in that column earlier/later? This will enable me to eliminate
entering duplicate values in a cell in a particular column...

Thanks muchly.

Raj

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
Using Match function with duplicate values in an array Richard Excel Worksheet Functions 3 April 22nd 23 07:45 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
How do I protect the cell from users entering values in Excel? Prasad NS Excel Worksheet Functions 1 January 12th 06 11:17 AM
How to take a cell that has 3 values and make 2 more new lines Phil Excel Worksheet Functions 4 October 23rd 05 10:53 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 02:03 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"