Solved

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

Posted on 2013-06-10
15
370 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
modify formula same cell multiple times 15 29
Consolidation 8 19
how to delete specific files and folders with VBA 3 24
VBA: copy range dynamically based on config sheet v2 3 31
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
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 using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

786 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