Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Return unique data from a list

Is there a formula to return a unique data from a list? For example, from
A2:A2000 there are names of States (i.e. CA, TX, NY, NJ, etc) that are
repeated. The list does not contain all 50 States and I need to isolate
which of the 50 states are included in the list. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Return unique data from a list

Try:

Data Filter AdvancedFilter Unique records only
--
Gary''s Student
gsnu200711

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Return unique data from a list

I know how to obtain the desired results using pivot tables and Filter, but I
looking for a formula that would accomplish the task. Thanks.

"Gary''s Student" wrote:

Try:

Data Filter AdvancedFilter Unique records only
--
Gary''s Student
gsnu200711

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Return unique data from a list

=IF(COUNTIF(A2:A2000,"CA")0,"CA","")
=IF(COUNTIF(A2:A2000,"TX")0,"TX","")

and continue downward. You will end up with fifty cells for the fifty
states, either visible (if they appeared in the big list) or blank

This works, but it is a painful substitute for using either pivots for
filters.

--
Gary''s Student
gsnu200711

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Return unique data from a list

It is an array formula you have to commit with ctrl+shift+enter, not just enter

=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$2:$A$10,$A$2 :$A$10,0),MATCH($A$2:$A$10,$A$2:$A$10,0))0,ROW(IN DIRECT("1:"&ROWS($A$2:$A$10)))),ROWS($1:1))),"",IN DEX($A$2:$A$10,SMALL(IF(FREQUENCY(MATCH($A$2:$A$10 ,$A$2:$A$10,0),MATCH($A$2:$A$10,$A$2:$A$10,0))0,R OW(INDIRECT("1:"&ROWS($A$2:$A$10)))),ROWS($1:1))))

Adjust to suit


"csong005" wrote:

Is there a formula to return a unique data from a list? For example, from
A2:A2000 there are names of States (i.e. CA, TX, NY, NJ, etc) that are
repeated. The list does not contain all 50 States and I need to isolate
which of the 50 states are included in the list. Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Return unique data from a list

On Mon, 19 Mar 2007 11:21:20 -0700, csong005
wrote:

Is there a formula to return a unique data from a list? For example, from
A2:A2000 there are names of States (i.e. CA, TX, NY, NJ, etc) that are
repeated. The list does not contain all 50 States and I need to isolate
which of the 50 states are included in the list. Thanks.


You could download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/

and then use the UNIQUEVALUES formula to return a sorted array of the state
abbreviations.

Some something like

=INDEX(UNIQUEVALUES(rng,1),ROWS($1:1))

copy/dragged down would return a sequential list of the abbreviations.
--ron
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Return unique data from a list

Try this:

Assumes no empty/blank cells within the range.

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(ROWS($1:1)<=SUM(1/COUNTIF(A$2:A$20,A$2:A$20)),INDEX(A$2:A$20,SMALL(I F(ROW(A$2:A$20)-MIN(ROW(A$2:A$20))+1=MATCH(A$2:A$20,A$2:A$20,0),RO W(A$2:A$20)-MIN(ROW(A$2:A$20))+1),ROWS($1:1))),"")

Copy down until you get blanks

Biff

"csong005" wrote in message
...
Is there a formula to return a unique data from a list? For example, from
A2:A2000 there are names of States (i.e. CA, TX, NY, NJ, etc) that are
repeated. The list does not contain all 50 States and I need to isolate
which of the 50 states are included in the list. Thanks.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Return unique data from a list

Teethless mama wrote...
It is an array formula you have to commit with ctrl+shift+enter, not
just enter

=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$2:$A$10,$A$ 2:$A$10,0),
MATCH($A$2:$A$10,$A$2:$A$10,0))0,
ROW(INDIRECT("1:"&ROWS($A$2:$A$10)))),ROWS($1:1)) ),"",
INDEX($A$2:$A$10,SMALL(IF(FREQUENCY(MATCH($A$2:$A $10,$A$2:$A$10,0),
MATCH($A$2:$A$10,$A$2:$A$10,0))0,
ROW(INDIRECT("1:"&ROWS($A$2:$A$10)))),ROWS($1:1)) ))

....

Shorter formulas are possible. Since this formula would need to be
filled down into other cells (the ROWS($1:1) term gives this away),
why not use different formulas in the first and subsequent cells?

If the data to be condensed were in a range named D, and if the
topmost cell of the result range were G3, try

G3:
=T(D)

G4 [array formula]:
=IF(IF(G3<"",MAX(MATCH(D,D,0))MATCH(G3,D,0)),
INDEX(D,SMALL(IF(MATCH(D,D,0)=ROW(D)-MIN(ROW(D))+1,
ROW(D)-MIN(ROW(D))+1),ROWS(G$3:G4))),"")

Fill G4 down as far as needed. Even with all instances of D replaced
with $A$2:$A$10, this is still a smaller formula, it uses no volatile
function calls, and it avoids unnecessary ISERROR calls.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Return unique data from a list

T. Valko

Thanks for the help!!!! It works perfectly.

csong005

"T. Valko" wrote:

Try this:

Assumes no empty/blank cells within the range.

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(ROWS($1:1)<=SUM(1/COUNTIF(A$2:A$20,A$2:A$20)),INDEX(A$2:A$20,SMALL(I F(ROW(A$2:A$20)-MIN(ROW(A$2:A$20))+1=MATCH(A$2:A$20,A$2:A$20,0),RO W(A$2:A$20)-MIN(ROW(A$2:A$20))+1),ROWS($1:1))),"")

Copy down until you get blanks

Biff

"csong005" wrote in message
...
Is there a formula to return a unique data from a list? For example, from
A2:A2000 there are names of States (i.e. CA, TX, NY, NJ, etc) that are
repeated. The list does not contain all 50 States and I need to isolate
which of the 50 states are included in the list. Thanks.




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Return unique data from a list

You're welcome. Thanks for the feedback!

Biff

"csong005" wrote in message
...
T. Valko

Thanks for the help!!!! It works perfectly.

csong005

"T. Valko" wrote:

Try this:

Assumes no empty/blank cells within the range.

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not
just
ENTER):

=IF(ROWS($1:1)<=SUM(1/COUNTIF(A$2:A$20,A$2:A$20)),INDEX(A$2:A$20,SMALL(I F(ROW(A$2:A$20)-MIN(ROW(A$2:A$20))+1=MATCH(A$2:A$20,A$2:A$20,0),RO W(A$2:A$20)-MIN(ROW(A$2:A$20))+1),ROWS($1:1))),"")

Copy down until you get blanks

Biff

"csong005" wrote in message
...
Is there a formula to return a unique data from a list? For example,
from
A2:A2000 there are names of States (i.e. CA, TX, NY, NJ, etc) that are
repeated. The list does not contain all 50 States and I need to
isolate
which of the 50 states are included in the list. Thanks.






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
DataValidationList - Unique Entries Rasheed Ahmed New Users to Excel 2 August 10th 06 11:54 AM
Unique numbers from data validation list nick_thomson Excel Worksheet Functions 4 April 4th 06 02:19 PM
How can I average data from a repeating list into a unique list? Bob Phillips Excel Worksheet Functions 0 March 3rd 06 06:47 PM
How can I average data from a repeating list into a unique list? Duke Carey Excel Worksheet Functions 0 March 3rd 06 06:38 PM
Data Validation using List (But needs unique list in drop down lis Tan New Users to Excel 1 July 8th 05 03:32 PM


All times are GMT +1. The time now is 04:08 PM.

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"