Unique in a Range

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,839
Office Version
  1. 2010
Platform
  1. Windows
How how would I count the unique (Return in A1) and extract the unique from H6:N16 please (Returns A3 downwards)... Range H6:N16 contains blanks...
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hello,

Your questions are not extremely precise ...

To count Unique values, you can test following :

Code:
=[URL="https://exceljet.net/excel-functions/excel-sumproduct-function"]SUMPRODUCT[/URL](1/[URL="https://exceljet.net/excel-functions/excel-countif-function"]COUNTIF[/URL]([SIZE=3]yourRange,yourRange[/SIZE]))

Hope this will help
 
Upvote 0
Hello there, I adjusted the ranges to make the Jeanie a little smaller... Your solution doesn't seem to be working James006...

Sheet1

ABCDEFGH
#DIV/0!Apple Fish
Dog
OrangeDog
Cat
Cat
Duck
Bird
Rabbit Rabbit

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]9[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]10[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]11[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
A1=SUMPRODUCT(1/COUNTIF(B1:H11,B1:H11))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
Hello,

Since you have many Blank cells ...

Code:
=SUMPRODUCT(1/COUNTIF(B1:H11,B1:H11&""))

HTH
 
Upvote 0
Thanks for that James...

Has anyone got any ideas how to extract the data please...?
 
Upvote 0
Please try at J2 and press Ctrl+Shift+Enter and drag down

Code:
=IFERROR(INDEX(INDEX($A$1:$H$11,N(IF(1,AGGREGATE(15,6,(ROW($A$1:$H$11)*100+COLUMN($A$1:$H$11))/($A$1:$H$11<>""),ROW(J1:J20))/100)),N(IF(1,MOD(AGGREGATE(15,6,(ROW($A$1:$H$11)*100+COLUMN($A$1:$H$11))/($A$1:$H$11<>""),ROW(J1:J20)),100)))),MATCH(0,COUNTIF(J$1:J1,INDEX($A$1:$H$11,N(IF(1,AGGREGATE(15,6,(ROW($A$1:$H$11)*100+COLUMN($A$1:$H$11))/($A$1:$H$11<>""),ROW(J1:J20))/100)),N(IF(1,MOD(AGGREGATE(15,6,(ROW($A$1:$H$11)*100+COLUMN($A$1:$H$11))/($A$1:$H$11<>""),ROW(J1:J20)),100))))),)),"")
 
Upvote 0
Thanks Bo_Ry, I couldn't get your solution to work... I had a good look around the Internet and found the following which seems to be working and extracting the unique alphabetically (cell A3 dragged down)... I think your count solution counts a blank cell James006 (see cell I1 below)…?

Excel Workbook
ABCDEFGHI
114AppleFish15
2ReturnsDog
3AppleOrangeDogFritzTommy
4BirdCatFritz
5CatDuck
6CooperCatRhinoFish
7DaveDuck
8DogFritz
9DuckBirdDave
10FishCooperGus
11FritzRabbitRabbit
12Gus
13Orange
14Rabbit
15Rhino
16Tommy
Sheet1
#VALUE!
</td></tr></table></td></tr></table>
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,601
Members
452,658
Latest member
GStorm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top