Extracting unique values from a range

Jasesair

Active Member
Joined
Apr 8, 2015
Messages
282
Office Version
  1. 2016
I am want to use something similar to the below formula to extract unique values from a range (AB14:BZ33), however this formula will only work when I change the range to simply being a row. The formula is also removing the blanks, which is ideal. To make this one work, I need to Ctrl-Shift-Enter, then drag down as needed.

Can anyone amend or offer a solution so this works across a range rather than just a row?

Many thanks for any assistance

=IFERROR(INDEX($AB$14:$BZ$33,MATCH(0,IF(ISBLANK($AB$14:$BZ$33),1,COUNTIF($B$53:B53,$AB$14:$BZ$33)),0)),"")
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Sorry, I didn't think anyone would be interested in a sample. It's just names randomly in each cell of the range...lots of blank cells and others with names. The formula will be going in cell b54 and be dragged down as far as needed.
 
Upvote 0
Suppose your data starts from Cell A1 , do you want to extract unique in cell B1 ?
 
Upvote 0
Not sure what you want but you could run this macro

VBA Code:
Sub jec()
 With CreateObject("scripting.dictionary")
   For Each it In Range("AB14:BZ33")
     c00 = .Item(it.Value)
   Next
  Range("B54", Range("B" & Rows.Count).End(xlUp)).ClearContents
  Range("B54").Resize(.Count) = Application.Transpose(.keys)
 End With
End Sub
 
Upvote 0
See if post 5 here helps:
I did not have time when I posted that link yesterday, but adapting it to your data range and (I gather) your formula location ..
With your version you may need Ctrl+Shift+Enter?

Jasesair.xlsm
BAAABACADAEAFAGAHAIAJAKALAM
14PlumPeach
15MelonMelonMelonMelon
16
17PlumWatermelonApplePeachPeach
18
19
20MelonKiwifruitBlackberry
21Apple
22ApplePeachRaspberry
23Apple
24
25RaspberryBlueberryCranberryBanana
26
33
52
53Plum
54Peach
55Melon
56Watermelon
57Apple
58Kiwifruit
59Blackberry
60Raspberry
61Blueberry
62Cranberry
63Banana
64 
65 
Sheet1
Cell Formulas
RangeFormula
B53:B65B53=IFERROR(INDIRECT(TEXT(AGGREGATE(15,6,(ROW(AB$14:BZ$33)*10^6+COLUMN(AB$14:BZ$33))/((AB$14:BZ$33<>"")*(ISNA(MATCH(AB$14:BZ$33,B$52:B52,0)))),1),"R000000C000000"),0),"")
 
Upvote 0
Solution
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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