Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
zia zia is offline
external usenet poster
 
Posts: 9
Default MS Excel Function (Find Duplicate values)

I am working on a huge worksheet which contains items master in column A. I
am trying to find duplicate values for item numbers, if any.
To find duplicates i normally use to follwoing formula
Column A Column B Formula
100 True Countif(A:A,A2)1
100 True Countif(A:A,A3)1
Brown True Countif(A:A,A4)1
Brown True Countif(A:A,A5)1
200 False Countif(A:A,A6)1
The above formula works fine for finding duplicates for both text and
numeric values. The problem that I have having is that my Item master has
some products with leading zeros and the above formula does not take them as
different values and will return "True" even though these are different items
numbers. for example for the following item numbers
11
011
0011
I have formatted the column as text so that excel would not eliminate the
leading zeros. Please help me locate the duplicate values. Thanks in advance
for your help.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 506
Default MS Excel Function (Find Duplicate values)

In your post you have mentioned that the A column is formatted as Text and
its consist leading zeros but the countif is considering the 11 & 0011 as
same value. The Substitute function will get you the expected result.

In B2 cell paste this formula
=SUBSTITUTE(A2,0,"/")
Copy the B2 cell and apply it to the remaining cells of B Column based on
the A Column data.

In C2 cell paste this formula
=COUNTIF(B:B,B2)1
Copy the C2 cell and apply it to the remaining cells of B Column based on
the A Column data.

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Zia" wrote:

I am working on a huge worksheet which contains items master in column A. I
am trying to find duplicate values for item numbers, if any.
To find duplicates i normally use to follwoing formula
Column A Column B Formula
100 True Countif(A:A,A2)1
100 True Countif(A:A,A3)1
Brown True Countif(A:A,A4)1
Brown True Countif(A:A,A5)1
200 False Countif(A:A,A6)1
The above formula works fine for finding duplicates for both text and
numeric values. The problem that I have having is that my Item master has
some products with leading zeros and the above formula does not take them as
different values and will return "True" even though these are different items
numbers. for example for the following item numbers
11
011
0011
I have formatted the column as text so that excel would not eliminate the
leading zeros. Please help me locate the duplicate values. Thanks in advance
for your help.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
zia zia is offline
external usenet poster
 
Posts: 9
Default MS Excel Function (Find Duplicate values)

Did not get a response but the found the solution

=if(sumproduct(--exact($A$1:$A$4000,A1))1,"duplicate","ok") or the
following but enter as array formula
if(sum(--exact($A$1:$A$4000,A1))1,"duplicate","ok")

"Zia" wrote:

I am working on a huge worksheet which contains items master in column A. I
am trying to find duplicate values for item numbers, if any.
To find duplicates i normally use to follwoing formula
Column A Column B Formula
100 True Countif(A:A,A2)1
100 True Countif(A:A,A3)1
Brown True Countif(A:A,A4)1
Brown True Countif(A:A,A5)1
200 False Countif(A:A,A6)1
The above formula works fine for finding duplicates for both text and
numeric values. The problem that I have having is that my Item master has
some products with leading zeros and the above formula does not take them as
different values and will return "True" even though these are different items
numbers. for example for the following item numbers
11
011
0011
I have formatted the column as text so that excel would not eliminate the
leading zeros. Please help me locate the duplicate values. Thanks in advance
for your help.

  #4   Report Post  
Posted to microsoft.public.excel.newusers
zia zia is offline
external usenet poster
 
Posts: 9
Default MS Excel Function (Find Duplicate values)

Thanks for your post.
The problem i see with this is that I do not want to lose zeros which are
part of item number for example 0011001 will be now //11//1.
I found a direct soloution by using the exact function togather with
sumproduct. Exact does treat 011 and 11 as seperate values.

"Ms-Exl-Learner" wrote:

In your post you have mentioned that the A column is formatted as Text and
its consist leading zeros but the countif is considering the 11 & 0011 as
same value. The Substitute function will get you the expected result.

In B2 cell paste this formula
=SUBSTITUTE(A2,0,"/")
Copy the B2 cell and apply it to the remaining cells of B Column based on
the A Column data.

In C2 cell paste this formula
=COUNTIF(B:B,B2)1
Copy the C2 cell and apply it to the remaining cells of B Column based on
the A Column data.

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Zia" wrote:

I am working on a huge worksheet which contains items master in column A. I
am trying to find duplicate values for item numbers, if any.
To find duplicates i normally use to follwoing formula
Column A Column B Formula
100 True Countif(A:A,A2)1
100 True Countif(A:A,A3)1
Brown True Countif(A:A,A4)1
Brown True Countif(A:A,A5)1
200 False Countif(A:A,A6)1
The above formula works fine for finding duplicates for both text and
numeric values. The problem that I have having is that my Item master has
some products with leading zeros and the above formula does not take them as
different values and will return "True" even though these are different items
numbers. for example for the following item numbers
11
011
0011
I have formatted the column as text so that excel would not eliminate the
leading zeros. Please help me locate the duplicate values. Thanks in advance
for your help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find duplicate values in a column during enter the value? kesav Excel Discussion (Misc queries) 0 July 18th 08 06:37 AM
What function will find and multiply specific values in excel? paul/bones Excel Worksheet Functions 1 March 20th 07 09:44 PM
Find Duplicate Values and Return Another Value [email protected] Excel Worksheet Functions 2 January 18th 07 05:25 PM
Function to find duplicate values, then delete Cam Excel Worksheet Functions 1 January 27th 06 01:38 AM
How do you find duplicate values in excel- 2 columns of numbers rickmanz Excel Discussion (Misc queries) 1 December 15th 04 11:16 PM


All times are GMT +1. The time now is 05:10 AM.

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

About Us

"It's about Microsoft Excel"