PC Review


Reply
Thread Tools Rate Thread

compare cells in a column for duplicates

 
 
=?Utf-8?B?TWVraW5uaWs=?=
Guest
Posts: n/a
 
      2nd Oct 2007
As I enter in company names into column B in my worksheet I would like a
macro to automaticlly check to see if I have a duplicate name already entered
and if so show it in a pop-up windows as an error. Now I thought a Loop If
statement would work however if memory serves me correct I would have to
enter all the names in my statement. Any assistance would be appreciated.
Thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UHJhbmF2IFZhaWR5YQ==?=
Guest
Posts: n/a
 
      2nd Oct 2007
I think macro is good option but you can achieve something simiar with
conditional formatting. Essentially, the conditional formatting will
highlight the entered name, if it has been already entered.

Select the range where you will be entering the data
goto Format-->Conditional Formatting
From the drop down select 'Formula Is'
Enter the formula as =IF(COUNTIF($A$1:$A$20,A5)>1,1,0)
Set the color pattern

Here you can change the range from A1:A20 to your actual range.

HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Mekinnik" wrote:

> As I enter in company names into column B in my worksheet I would like a
> macro to automaticlly check to see if I have a duplicate name already entered
> and if so show it in a pop-up windows as an error. Now I thought a Loop If
> statement would work however if memory serves me correct I would have to
> enter all the names in my statement. Any assistance would be appreciated.
> Thanks

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      2nd Oct 2007
Take a look at this page:

http://www.cpearson.com/Excel/Duplicates.aspx
and this page
http://www.cpearson.com/excel/NoDupEntry.aspx

--
Regards,
Tom Ogilvy


"Mekinnik" wrote:

> As I enter in company names into column B in my worksheet I would like a
> macro to automaticlly check to see if I have a duplicate name already entered
> and if so show it in a pop-up windows as an error. Now I thought a Loop If
> statement would work however if memory serves me correct I would have to
> enter all the names in my statement. Any assistance would be appreciated.
> Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare 1 cell to column of cells returning adjacent cells info? Mr. Fine Microsoft Excel Worksheet Functions 1 15th Apr 2010 07:36 PM
Counting Cells in a column depending on another column but excluding duplicates rwenger Microsoft Excel Misc 2 11th Apr 2010 02:57 PM
compare data in column A with column B to find duplicates George Microsoft Excel Misc 8 6th Feb 2009 03:53 PM
compare cells in column to criteria, then average next column cell Bradwin Microsoft Excel Worksheet Functions 2 21st Jul 2008 08:37 PM
compare column of numbers and notify of duplicates Jeanie Microsoft Excel Worksheet Functions 1 7th Oct 2003 05:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:33 PM.