Formula to Extract Unqiue Numbers

legalhustler

Well-known Member
Joined
Jun 5, 2014
Messages
1,160
Office Version
  1. 365
Platform
  1. Windows
I have the following array formula that requires CSE, but would like to change it so I don't use CSE. I think AGGREGATE function would be a substitute?? Can someone help.


{=IF(ROWS($C$4:C4)<=$D$4,INDEX($C$4:$C$51,SMALL(IF(FREQUENCY(IF($C$4:$C$51<>"",MATCH($C$4:$C$51,$C$4:$C$51,0)),ROW($C$4:$C$51)-ROW($C$4)+1),ROW($C$4:$C$51)-ROW($C$4)+1),ROWS($C$4:C4))),"")}
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
It looks like the need of applying control+shift+enter (CSE) bothers you. The following set up does not require CSE.

Row\Col
C​
D​
E​
3​
Num
0​
unique
4​
2​
1​
2​
5​
2​
5​
6​
5​
2​
7​
7​
5​
3​
8​
7​
3​
6​
9​
7​
8​
10​
3​
4​
11​
6​
5​
12​
2​
13​
7​
14​
8​
6​

D3 must house a 0.

In D4 enter and copy down:

=IF(ISNUMBER(MATCH($C4,$C$3:C3,0)),"",LOOKUP(9.99999999999999E+307,$D$3:D3)+1)

In E4 enter and copy down:

=IF(ROWS($E$4:E4)<=LOOKUP(9.99999999999999E+307,$D$4:$D$14),LOOKUP(ROWS($E$4:E4),$D$4:$D$14,$C$4:$C$14),"")
 
Upvote 0
It looks like the need of applying control+shift+enter (CSE) bothers you. The following set up does not require CSE.

Row\Col
C​
D​
E​
3​
Num
0​
unique
4​
2​
1​
2​
5​
2​
5​
6​
5​
2​
7​
7​
5​
3​
8​
7​
3​
6​
9​
7​
8​
10​
3​
4​
11​
6​
5​
12​
2​
13​
7​
14​
8​
6​

D3 must house a 0.

In D4 enter and copy down:

=IF(ISNUMBER(MATCH($C4,$C$3:C3,0)),"",LOOKUP(9.99999999999999E+307,$D$3:D3)+1)

In E4 enter and copy down:

=IF(ROWS($E$4:E4)<=LOOKUP(9.99999999999999E+307,$D$4:$D$14),LOOKUP(ROWS($E$4:E4),$D$4:$D$14,$C$4:$C$14),"")

Anyways to avoid helper columns too? :) Also formula needs to exclude empty cells, like shown in my original formula.
 
Last edited:
Upvote 0
Anyways to avoid helper columns too? :)

That's the gist of the set up. It trades off cell memory against more speed (and no CSE).

Also formula needs to exclude empty cells, like shown in my original formula.

Modify the formula in D4 to...

=IF($C4="","",IF(ISNUMBER(MATCH($C4,$C$3:C3,0)),"",LOOKUP(9.99999999999999E+307,$D$3:D3)+1))

and copy down.
 
Upvote 0

Forum statistics

Threads
1,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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