A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Finding duplicates



 
 
Thread Tools Display Modes
  #1  
Old February 10th, 2010, 09:38 PM posted to microsoft.public.excel.worksheet.functions
Louja
external usenet poster
 
Posts: 17
Default Finding duplicates

How do I write a formula that looks at two columns and looks for
duplicate values in both, and flags the row if it finds them in?

See below example I would want to look at columns A and B and look for
duplicate values in both columns

A B
123 abc
124 def
125 ghi
126 jkl
126 mno
126 mno
127 pqr
  #2  
Old February 10th, 2010, 11:20 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default Finding duplicates

Assuming your data in A1:B7

In C1: =IF(SUMPRODUCT(($A$1:$A$7=A1)*($B$1:$B$7=B1))1,"D up","")
copy down to C7


"Louja" wrote:

How do I write a formula that looks at two columns and looks for
duplicate values in both, and flags the row if it finds them in?

See below example I would want to look at columns A and B and look for
duplicate values in both columns

A B
123 abc
124 def
125 ghi
126 jkl
126 mno
126 mno
127 pqr
.

  #3  
Old February 11th, 2010, 12:10 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Finding duplicates

Hi,

If by flag you mean, color for identification, then try this. Assume that
your data is in range A11:B17. Click on cell A12 and got to:

Excel 2003: Format Conditional formatting Formula is
Excel 2007: Home Styles Conditional formatting new Rule Use a
formula to determine which cells to format

Enter the following formula
=SUMPRODUCT(($A$11:$A11=$A12)*($B$11:$B11=$B12))= 1. Select the font or
background color and come out of the conditional formatting dialog box. Now
copy and paste the conditional formatting (Copy Paste special format)
till B17.

Please note that the above formula will highlight only the occurrences after
the first one. For highlighting all occurrences, try this formula

=SUMPRODUCT(($D$11:$D$17=$D11)*($E$11:$E$17=$E11)) 1



--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Louja" wrote in message
...
How do I write a formula that looks at two columns and looks for
duplicate values in both, and flags the row if it finds them in?

See below example I would want to look at columns A and B and look for
duplicate values in both columns

A B
123 abc
124 def
125 ghi
126 jkl
126 mno
126 mno
127 pqr


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.