Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Peter
 
Posts: n/a
Default Extracting unique records by formula

I want to extract the unique records from column A into column B by formula
ie: NOT using the Advanced Filter. Any ideas? Thanks.
--
Peter
London, UK
  #2   Report Post  
Rowan
 
Posts: n/a
Default

Stolen from J-Walk:
Assuming data is in cells A2:A100. Enter this array formula in B2 -
commit with ctrl+shift+enter.
=INDEX($A$2:$A$100,SMALL(IF(MATCH($A$2:$A$100,$A$2 :$A$100,0)=ROW($A$1:INDIRECT(CHAR(65)&COUNTA($A$2: $A$100))),MATCH($A$2:$A$100,$A$2:$A$100,0),""),ROW ()-ROW($A$2:$A$100)+1))
Copy down.
Note you will have to adjust the range to suit your data as any blank
cells will result in a #NA error.

Hope this helps
Rowan

Peter wrote:
I want to extract the unique records from column A into column B by formula
ie: NOT using the Advanced Filter. Any ideas? Thanks.

  #3   Report Post  
Max
 
Posts: n/a
Default

Another play to extract the uniques list using non-array formulas

Assuming records listed in A1 down

Put in B1:
=IF(A1="","",IF(COUNTIF($A$1:A1,A1)1,"",ROW()))

Put in C1:
=IF(ISERROR(SMALL(B:B,ROWS($A$1:A1))),"",
INDEX(A:A,MATCH(SMALL(B:B,ROWS($A$1:A1)),B:B,0)))

Select B1:C1, copy down till the last row of data in col A

Col C will return the list of unique records in col A,
neatly bunched at the top
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Peter" wrote in message
...
I want to extract the unique records from column A into column B by

formula
ie: NOT using the Advanced Filter. Any ideas? Thanks.
--
Peter
London, UK



  #4   Report Post  
Domenic
 
Posts: n/a
Default

Assuming that A1:A10 contains your data, try the following...

B1: Leave empty

B2, copied down:

=IF(OR(COUNTIF($B$1:B1,A1:$A$10)=0),INDEX(A1:$A$10 ,MATCH(0,COUNTIF($B$1:B
1,A1:$A$10),0)),"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Peter" wrote:

I want to extract the unique records from column A into column B by formula
ie: NOT using the Advanced Filter. Any ideas? Thanks.

  #5   Report Post  
Peter
 
Posts: n/a
Default

Many thanks for your contribution guys....I'll try the methods these this
afternoon and post response.
--
Peter
London, UK


"Domenic" wrote:

Assuming that A1:A10 contains your data, try the following...

B1: Leave empty

B2, copied down:

=IF(OR(COUNTIF($B$1:B1,A1:$A$10)=0),INDEX(A1:$A$10 ,MATCH(0,COUNTIF($B$1:B
1,A1:$A$10),0)),"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Peter" wrote:

I want to extract the unique records from column A into column B by formula
ie: NOT using the Advanced Filter. Any ideas? Thanks.




  #6   Report Post  
Biff
 
Posts: n/a
Default

What's the OR for?

It's doing nothing!

Biff

"Domenic" wrote in message
...
Assuming that A1:A10 contains your data, try the following...

B1: Leave empty

B2, copied down:

=IF(OR(COUNTIF($B$1:B1,A1:$A$10)=0),INDEX(A1:$A$10 ,MATCH(0,COUNTIF($B$1:B
1,A1:$A$10),0)),"")

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Peter" wrote:

I want to extract the unique records from column A into column B by
formula
ie: NOT using the Advanced Filter. Any ideas? Thanks.



  #7   Report Post  
Domenic
 
Posts: n/a
Default

Actually, it's there so that the cell remains blank when no more unique
records exist. Otherwise the formula would return a #N/A error. It's
something I recently picked up from Harlan.

In article ,
"Biff" wrote:

What's the OR for?

It's doing nothing!

Biff

  #8   Report Post  
Biff
 
Posts: n/a
Default

What's the OR for?

It's doing nothing!


Nevermind, I see!

Biff

"Biff" wrote in message
...
What's the OR for?

It's doing nothing!

Biff

"Domenic" wrote in message
...
Assuming that A1:A10 contains your data, try the following...

B1: Leave empty

B2, copied down:

=IF(OR(COUNTIF($B$1:B1,A1:$A$10)=0),INDEX(A1:$A$10 ,MATCH(0,COUNTIF($B$1:B
1,A1:$A$10),0)),"")

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Peter" wrote:

I want to extract the unique records from column A into column B by
formula
ie: NOT using the Advanced Filter. Any ideas? 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
Modifying a Formula To display only Unique Values carl Excel Worksheet Functions 1 April 16th 05 08:17 PM
Find Matching Records in Two Worksheets kittybat Excel Discussion (Misc queries) 2 April 5th 05 06:51 PM
IF & VLOOKUP FORMULA taxmom Excel Worksheet Functions 3 March 2nd 05 03:35 PM
In column A I have duplicate records. How do I tag an unique reco. Tian Excel Discussion (Misc queries) 2 January 13th 05 07:37 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM


All times are GMT +1. The time now is 06:59 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"