Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nebb
 
Posts: n/a
Default Check for Duplicates


Cells A1 thru A50 contain a single number between 1 and 100. If I
wanted to determine if the number 8 appeared more than once, I could
use
‘if (countif(a1:a100,8)=2,x,y)’. Is there a short way of checking to
see if any number between 1 and 100 appears more than once without
repeating the above formula 100 times?


--
nebb
------------------------------------------------------------------------
nebb's Profile: http://www.excelforum.com/member.php...fo&userid=8981
View this thread: http://www.excelforum.com/showthread...hreadid=511727

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Check for Duplicates

You could use Data | Filter | Advanced Filter to obtain unique values
from your list (copied to B1 downwards, say). Then you could compare
the length of your first list with the length of your second list - if
the column B list is shorter then you have duplicates. To find out
which are duplicated, enter this formula in C1 and copy down by
double-clicking the fill handle on C1:

=COUNTIF(A$1:A$100,B1)

Hope this helps.

Pete

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Check for Duplicates

Select say B1:b50

in the formula bar enter

=IF(ISERROR(SMALL(IF(COUNTIF($A$1:$A$50,$A$1:$A$50 )1,ROW($A1:$A50),""),ROW(
$A1:$A50))),"",
INDEX($A$1:$A$50,SMALL(IF(COUNTIF($A$1:$A$50,$A$1: $A$50)1,ROW($A1:$A50),"")
,ROW($A1:$A50))))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

This will show the duplicates many times, but that's not so bad.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"nebb" wrote in message
...

Cells A1 thru A50 contain a single number between 1 and 100. If I
wanted to determine if the number 8 appeared more than once, I could
use
'if (countif(a1:a100,8)=2,x,y)'. Is there a short way of checking to
see if any number between 1 and 100 appears more than once without
repeating the above formula 100 times?


--
nebb
------------------------------------------------------------------------
nebb's Profile:

http://www.excelforum.com/member.php...fo&userid=8981
View this thread: http://www.excelforum.com/showthread...hreadid=511727



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
Entry into check box dependent on other check box. Stilla Excel Worksheet Functions 9 December 10th 05 03:44 PM
Can you sort with check boxes? Q Excel Discussion (Misc queries) 3 November 10th 05 08:11 PM
check boxes - copy MarkT Excel Discussion (Misc queries) 2 October 20th 05 04:33 PM
How do I use a check box to accept a calculation Joejoethecrackman Excel Discussion (Misc queries) 5 March 22nd 05 08:47 PM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM


All times are GMT +1. The time now is 06:55 PM.

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

About Us

"It's about Microsoft Excel"