Unique in a Range

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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
1#DIV/0!Apple Fish
2 Dog
3 OrangeDog
4 Cat
5
6 Cat
7 Duck
8
9 Bird
10
11 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>
</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
You are welcome ...

How to extract what ...?
 
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,216,531
Messages
6,131,209
Members
449,636
Latest member
ajdebm

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