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  

Formula (not adv. filter) to list unique values from list



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2009, 06:09 PM posted to microsoft.public.excel.worksheet.functions
Brian[_16_]
external usenet poster
 
Posts: 34
Default Formula (not adv. filter) to list unique values from list

Howdy all,

I have a list of names which appear multiple times in a column with about
20,000 entries.

I want to create a list of the unique names on a new sheet, but I don't want
to use the advanced filter technique because I want to be able to refresh
this list when new data is entered.

Thanks for your time and attention!

Brian


  #2  
Old May 11th, 2009, 06:38 PM posted to microsoft.public.excel.worksheet.functions
Domenic[_2_]
external usenet poster
 
Posts: 265
Default Formula (not adv. filter) to list unique values from list

In article ,
"Brian" wrote:

Howdy all,

I have a list of names which appear multiple times in a column with about
20,000 entries.

I want to create a list of the unique names on a new sheet, but I don't want
to use the advanced filter technique because I want to be able to refresh
this list when new data is entered.

Thanks for your time and attention!

Brian


Let's assume that A2:A100 contains the data. Here's two possibilities.
The first one uses a helper column and should be more efficient.

[Option 1]

B1: 0

(Enter a 0 in B1)

B2, copied down:

=IF(A2"",IF(ISNA(MATCH(A2,$A$1:A1,0)),LOOKUP(9.9 9999999999999E+307,$B$1
:B1)+1,""),"")

D2:

=LOOKUP(9.99999999999999E+307,B:B)

E2, copied down:

=IF(ROWS(E$2:E2)=$D$2,INDEX($A$2:$A$100,MATCH(ROW S(E$2:E2),$B$2:$B$100,0
)),"")

[Option 2]

C2, confirmed with CONTROL+SHIFT+ENTER:

=SUM(IF(FREQUENCY(IF(A2:A100"",MATCH("~"&A2:A100 ,A2:A100&"",0)),ROW(A2:
A100)-ROW(A2)+1),1))

D2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=IF(ROWS(D$22)=$C$2,INDEX($A$2:$A$100,SMALL(IF( FREQUENCY(IF($A$2:$A$10
0"",MATCH("~"&$A$2:$A$100,$A$2:$A$100&"",0)),ROW ($A$2:$A$100)-ROW($A$2)
+1),ROW($A$2:$A$100)-ROW($A$2)+1),ROWS(D$22))),"")

--
Domenic
http://www.xl-central.com
  #3  
Old May 12th, 2009, 03:12 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Formula (not adv. filter) to list unique values from list

Hi,

You can also try this. Assume your list is in A2:A5. In B2, enter
=IF(COUNTIF($A$2:$A2,A2)1,0,MAX($B$1:B1)+1) and copy down till B5. In cell
C2, array enter (Ctrl+Shift+Enter)
=IF(MIN(IF((B2:B50)*(B2:B5MAX($C$1:C1)),B2:B5)) 0,MIN(IF((B2:B50)*(B2:B5MAX($C$1:C1)),B2:B5)),"" )
and copy down.

Now in cell D2, enter
=IF(ISERROR(INDEX($A$2:$B$5,MATCH(C2,$B$2:$B$5,0), 1)),"",INDEX($A$2:$B$5,MATCH(C2,$B$2:$B$5,0),1))
and copy down

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Brian" wrote in message
...
Howdy all,

I have a list of names which appear multiple times in a column with about
20,000 entries.

I want to create a list of the unique names on a new sheet, but I don't
want to use the advanced filter technique because I want to be able to
refresh this list when new data is entered.

Thanks for your time and attention!

Brian

  #4  
Old May 12th, 2009, 04:33 AM posted to microsoft.public.excel.worksheet.functions
Brian[_16_]
external usenet poster
 
Posts: 34
Default Formula (not adv. filter) to list unique values from list

Thanks Domenic, works like a charm.


"Domenic" wrote in message
...
In article ,
"Brian" wrote:

Howdy all,

I have a list of names which appear multiple times in a column with about
20,000 entries.

I want to create a list of the unique names on a new sheet, but I don't
want
to use the advanced filter technique because I want to be able to refresh
this list when new data is entered.

Thanks for your time and attention!

Brian


Let's assume that A2:A100 contains the data. Here's two possibilities.
The first one uses a helper column and should be more efficient.

[Option 1]

B1: 0

(Enter a 0 in B1)

B2, copied down:

=IF(A2"",IF(ISNA(MATCH(A2,$A$1:A1,0)),LOOKUP(9.9 9999999999999E+307,$B$1
:B1)+1,""),"")

D2:

=LOOKUP(9.99999999999999E+307,B:B)

E2, copied down:

=IF(ROWS(E$2:E2)=$D$2,INDEX($A$2:$A$100,MATCH(ROW S(E$2:E2),$B$2:$B$100,0
)),"")

[Option 2]

C2, confirmed with CONTROL+SHIFT+ENTER:

=SUM(IF(FREQUENCY(IF(A2:A100"",MATCH("~"&A2:A100 ,A2:A100&"",0)),ROW(A2:
A100)-ROW(A2)+1),1))

D2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=IF(ROWS(D$22)=$C$2,INDEX($A$2:$A$100,SMALL(IF( FREQUENCY(IF($A$2:$A$10
0"",MATCH("~"&$A$2:$A$100,$A$2:$A$100&"",0)),ROW ($A$2:$A$100)-ROW($A$2)
+1),ROW($A$2:$A$100)-ROW($A$2)+1),ROWS(D$22))),"")

--
Domenic
http://www.xl-central.com



 




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 08:36 AM.


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