Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default List of unique texts and numbers

In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.

I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.

What formula should I use in B1:B1000 ?

Thank you

A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5

Is it possible that B1:B1000 appear already sorted?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default List of unique texts and numbers

v,

You can do this with three columns of formulas.

In cell B1, enter the formula

=IF(COUNTIF($A$1:A1,A1)=1,A1,"")

In cell C1, enter the formula

=IF(B1<"",SUMPRODUCT(($B$1:$B$1000<"")*($B$1:$B$ 1000<B1)*1)+1,"")

In cell D1, enter the formula

=IF(NOT(ISERROR(MATCH(ROW(),C:C,FALSE))),INDEX(B:B ,MATCH(ROW(),C:C,FALSE)),"")

And copy all three cells down to match your list in column A


HTH,
Bernie
MS Excel MVP


"vsoler" wrote in message
oups.com...
In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.

I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.

What formula should I use in B1:B1000 ?

Thank you

A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5

Is it possible that B1:B1000 appear already sorted?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default List of unique texts and numbers

=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1: $A$4,0),MATCH($A$1:$A$4,$A$1:$A$4,0))0,ROW(INDIRE CT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))),"",INDEX($ A$1:$A$4,SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1:$ A$4,0),MATCH($A$1:$A$4,$A$1:$A$4,0))0,ROW(INDIREC T("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))))

Adjust your range to suit
ctrl+shift+enter, not just enter
copy down as far as needed


"vsoler" wrote:

In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.

I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.

What formula should I use in B1:B1000 ?

Thank you

A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5

Is it possible that B1:B1000 appear already sorted?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default List of unique texts and numbers

On 18 mayo, 19:28, Teethless mama
wrote:
=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1: $A$4,0),MATCH($A$1:$A$4,$*A$1:$A$4,0))0,ROW(INDIR ECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))),"",INDEX( $*A$1:$A$4,SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1 :$A$4,0),MATCH($A$1:$A$4,$A*$1:$A$4,0))0,ROW(INDI RECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))))

Adjust your range to suit
ctrl+shift+enter, not just enter
copy down as far as needed



"vsoler" wrote:
In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.


I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.


What formula should I use in B1:B1000 ?


Thank you


A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5


Is it possible that B1:B1000 appear already sorted?- Ocultar texto de la cita -


- Mostrar texto de la cita -


Teethless mama,

Your formula seems really interesting.
However, my range contains blank cells and I get #N/A as result.

Is there anyway to fix it?

Thanks in advance

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default List of unique texts and numbers

Try this:

Give your range of data a named range called rng.

Enter this formula in B1:

=SUMPRODUCT((rng<"")/COUNTIF(rng,rng&""))

Enter this array** formula in D1 and copy down until you get blanks:

=IF(ROWS($1:1)<=B$1,INDEX(rng,SMALL(IF(rng<"",IF( ROW(rng)-MIN(ROW(rng))+1=MATCH(rng,rng,0),ROW(rng)-MIN(ROW(rng))+1)),ROWS($1:1))),"")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

Biff

"vsoler" wrote in message
oups.com...
On 18 mayo, 19:28, Teethless mama
wrote:
=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1: $A$4,0),MATCH($A$1:$A$4,$*A$1:$A$4,0))0,ROW(INDIR ECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))),"",INDEX( $*A$1:$A$4,SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1 :$A$4,0),MATCH($A$1:$A$4,$A*$1:$A$4,0))0,ROW(INDI RECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))))

Adjust your range to suit
ctrl+shift+enter, not just enter
copy down as far as needed



"vsoler" wrote:
In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.


I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.


What formula should I use in B1:B1000 ?


Thank you


A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5


Is it possible that B1:B1000 appear already sorted?- Ocultar texto de la
cita -


- Mostrar texto de la cita -


Teethless mama,

Your formula seems really interesting.
However, my range contains blank cells and I get #N/A as result.

Is there anyway to fix it?

Thanks in advance




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default List of unique texts and numbers

This formula ignore blank cells in a range, and give you the unique texts and
numbers

"uniq" is a define name range, of course no quotes

=IF(ISERR(SMALL(IF(FREQUENCY(IF(uniq<"",MATCH(uni q&"",uniq&"",0)),MATCH(uniq&"",uniq&"",0))0,ROW(I NDIRECT("1:"&ROWS(uniq)))),ROWS($1:1))),"",INDEX(u niq,SMALL(IF(FREQUENCY(IF(uniq<"",MATCH(uniq&"",u niq&"",0)),MATCH(uniq&"",uniq&"",0))0,ROW(INDIREC T("1:"&ROWS(uniq)))),ROWS($1:1))))

ctrl+shift+enter, not just enter
copy down as far as needed

"vsoler" wrote:

On 18 mayo, 19:28, Teethless mama
wrote:
=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1: $A$4,0),MATCH($A$1:$A$4,$Â*A$1:$A$4,0))0,ROW(INDI RECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))),"",INDEX ($Â*A$1:$A$4,SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A $1:$A$4,0),MATCH($A$1:$A$4,$AÂ*$1:$A$4,0))0,ROW(I NDIRECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))))

Adjust your range to suit
ctrl+shift+enter, not just enter
copy down as far as needed



"vsoler" wrote:
In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.


I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.


What formula should I use in B1:B1000 ?


Thank you


A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5


Is it possible that B1:B1000 appear already sorted?- Ocultar texto de la cita -


- Mostrar texto de la cita -


Teethless mama,

Your formula seems really interesting.
However, my range contains blank cells and I get #N/A as result.

Is there anyway to fix it?

Thanks in advance


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default List of unique texts and numbers

On 19 mayo, 03:57, "T. Valko" wrote:
Try this:

Give your range of data a named range called rng.

Enter this formula in B1:

=SUMPRODUCT((rng<"")/COUNTIF(rng,rng&""))

Enter this array** formula in D1 and copy down until you get blanks:

=IF(ROWS($1:1)<=B$1,INDEX(rng,SMALL(IF(rng<"",IF( ROW(rng)-MIN(ROW(rng))+1=*MATCH(rng,rng,0),ROW(rng)-MIN(ROW(rng))+1)),ROWS($1:1))),"")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

Biff

"vsoler" wrote in message

oups.com...
On 18 mayo, 19:28, Teethless mama





wrote:
=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1: $A$4,0),MATCH($A$1:$A$4,$**A$1:$A$4,0))0,ROW(INDI RECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))),"",INDEX (*$*A$1:$A$4,SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A $1:$A$4,0),MATCH($A$1:$A$4,*$A*$1:$A$4,0))0,ROW(I NDIRECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))))


Adjust your range to suit
ctrl+shift+enter, not just enter
copy down as far as needed


"vsoler" wrote:
In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.


I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.


What formula should I use in B1:B1000 ?


Thank you


A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5


Is it possible that B1:B1000 appear already sorted?- Ocultar texto de la
cita -


- Mostrar texto de la cita -


Teethless mama,

Your formula seems really interesting.
However, my range contains blank cells and I get #N/A as result.

Is there anyway to fix it?

Thanks in advance- Ocultar texto de la cita -

- Mostrar texto de la cita -


Une more question, if you don't mind:

Why do you add the expression &"" in your formula? for me it's a
mistery

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default List of unique texts and numbers

"vsoler" wrote in message
ups.com...
On 19 mayo, 03:57, "T. Valko" wrote:
Try this:

Give your range of data a named range called rng.

Enter this formula in B1:

=SUMPRODUCT((rng<"")/COUNTIF(rng,rng&""))

Enter this array** formula in D1 and copy down until you get blanks:

=IF(ROWS($1:1)<=B$1,INDEX(rng,SMALL(IF(rng<"",IF( ROW(rng)-MIN(ROW(rng))+1=*MATCH(rng,rng,0),ROW(rng)-MIN(ROW(rng))+1)),ROWS($1:1))),"")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

Biff

"vsoler" wrote in message

oups.com...
On 18 mayo, 19:28, Teethless mama





wrote:
=IF(ISERR(SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A$1: $A$4,0),MATCH($A$1:$A$4,$**A$1:$A$4,0))0,ROW(INDI RECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))),"",INDEX (*$*A$1:$A$4,SMALL(IF(FREQUENCY(MATCH($A$1:$A$4,$A $1:$A$4,0),MATCH($A$1:$A$4,*$A*$1:$A$4,0))0,ROW(I NDIRECT("1:"&ROWS($A$1:$A$4)))),ROWS($1:1))))


Adjust your range to suit
ctrl+shift+enter, not just enter
copy down as far as needed


"vsoler" wrote:
In A1:A1000 I have cells with text and blank cells. Texts are often
repeated.


I would like in B1:B1000 all texts appearing at the top, without any
duplicates, blanl at the bottom.


What formula should I use in B1:B1000 ?


Thank you


A B
1 ABC ABC
2 XYZ XYZ
3 GHT GHT
4 GHT
5


Is it possible that B1:B1000 appear already sorted?- Ocultar texto de
la
cita -


- Mostrar texto de la cita -


Teethless mama,

Your formula seems really interesting.
However, my range contains blank cells and I get #N/A as result.

Is there anyway to fix it?

Thanks in advance- Ocultar texto de la cita -

- Mostrar texto de la cita -


Une more question, if you don't mind:

Why do you add the expression &"" in your formula? for me it's a
mistery

=SUMPRODUCT((rng<"")/COUNTIF(rng,rng&""))

It prevents empty cells from causing errors in the formula.

Let's break the formula down and see what's happening. Try this experiement.

A1 = leave this cell empty
A2 = X
A3 = Y
A4 = X
A5 = 1

Enter this formula in C1 and copy down to C5:

=A1<""

Enter this formula in D1 and copy down to D5:

=COUNTIF(A$1:A$5,A1)

Enter this formula in E1 and copy down to E5:

=C1/D1

Enter this formula in F1:

=SUM(E1:E5)

As you'll see, the result is a #DIV/0! error.

Now, change the formula in D1 to:

=COUNTIF(A$1:A$5,A1&"")

Copy down to D5. See the difference?

Biff


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
Conditional Formatting : Numbers & Texts Conflict nayinky Excel Worksheet Functions 3 August 8th 06 07:15 AM
how to extract unique numbers once from a list of repeated numbers? [email protected] Excel Discussion (Misc queries) 2 May 2nd 06 04:17 PM
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? Duke Carey Excel Worksheet Functions 0 March 3rd 06 06:38 PM
convert numbers to texts sampath Excel Worksheet Functions 1 December 2nd 04 01:18 PM


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