Solved

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

Posted on 2013-06-10
15
363 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
  • 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
 

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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now