Solved

Find duplicate values in column A based on values in Column C

Posted on 2013-06-10
15
375 Views
Last Modified: 2013-06-10
I have an Excel workbook that I need to see if the vlaues in Column A  are duplicates of values in COlumn C.  That is, if A15 is also in Column C, make A15 red with pink text.  I know this would be an array formula in Excel 2010, but not sure how.

Sandra
0
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
15 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39236186
Conditional formatting can be used to highlight all rows which contain duplicate values in one or more columns. Four scenarios are presented below with solutions. All scenarios require that all cells in the table be selected. In Excel 2003 and earlier, choose the menu command Format->Conditional Formatting and select the "Formula Is" option. In Excel 2007 and later, navigate to the Home tab, select Conditional Formatting->New Rule, and select the Rule Type "Use a formula to determine which cells to format". The following examples assumes the data starts in row 2 and extends to a maximum of row 100.

   =COUNTIF($C$2:$C$100,$A2)>0

Kevin
0
 

Author Comment

by:ssmith94015
ID: 39236190
I don't get it.  I want coulmn A to change its format color if its value is in column B, why would I use column C?
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39236207
Because you said "Find duplicate values in column A based on values in Column C"

:-)

Use this formula for column B:


   =COUNTIF($B$2:$B$100,$A2)>0

Kevin
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:ssmith94015
ID: 39236209
I did, BUT instead of comparing to unique values, it simply color anything number that matched.  That is, if I have 51 in the first column, but 5 or 182 in the second, it colors the 51 red!  It is not matching to the values in the second column, it is matching to ANY value in the second column.
0
 

Author Comment

by:ssmith94015
ID: 39236211
Sorry, my typo mistake on the columns.
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39236215
Can you post an example if it's still not working?

Kevin
0
 

Author Comment

by:ssmith94015
ID: 39236216
51      5
215      2
2182      6
182      182
215      215

Simple example, but it highlights the 51, 2182 and 182 in red in teh first column.  Which, what I want, would be the 182 and 215 in the first column to be highlighted.  could it be backward?

Sandra
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 39236222
Yes, check the conditional formatting rule. The Rule Type must be "Use a formula to determine which cells to format" and the formula:

=COUNTIF($B$2:$B$100,$A2)>0

Kevin
0
 

Author Comment

by:ssmith94015
ID: 39236226
Yes, used that Rule Tpe, but still does not format the cells correctly.
0
 

Author Closing Comment

by:ssmith94015
ID: 39236228
thank you, got it to work!
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39236230
See attached.

Kevin
Conditional-Formatting.xlsx
0
 

Author Comment

by:ssmith94015
ID: 39236237
One thing, it only works on small numbers, when I used our 9 digit account numbers, it does not format.  Oh, well, it does work, up to a point.
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39236244
It will work with nine digit numbers. But the values in column A have to be formatted the same as those in column B.

Kevin
0
 

Author Comment

by:ssmith94015
ID: 39236249
Nope.  Both are formatting the same, but it still only works with small numbers.  I am going to try to create a function that will do this.  So, am posting another question regarding building a function.

Thank you for your help.

Sandra
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39236252
I just tried with nine digit numbers formatted as numbers, text, and with a leading apostrophe. All worked.

Kevin
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question