Wrap Unique List using frequency

pto160

Active Member
Joined
Feb 1, 2009
Messages
365
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a formula returning multiple values, but there is duplicate values in the index list. Can I return an unique list for columns E to H? I am getting the duplicate "Credit" in row 5 to 8.
I am using Excel 2016 at work. Here is what I have.

Book1
ABCDEFGH
1TypeOrderAmountResultsResultsResultsResults
2Sale312800200Sale   
3Credit312900500CreditSale  
4Sale312900400CreditSale  
5Auth314200100AuthSaleCreditCredit
6Sale314200100AuthSaleCreditCredit
7Credit314200300AuthSaleCreditCredit
8Credit31420050AuthSaleCreditCredit
9Sale315100100SaleCredit  
10Credit315100200SaleCredit  
11Auth318100200Auth   
12Auth320100500AuthSale  
13Sale320100500AuthSale  
Sheet1
Cell Formulas
RangeFormula
E2:H13E2=IFERROR(INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13=$B2,ROW($B$2:$B$13)-ROW($B$2)+1),COLUMNS($E2:E2))),"")


Here are the desired results:
Cell Formulas
RangeFormula
E2:H4,E5:G13E2=IFERROR(INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13=$B2,ROW($B$2:$B$13)-ROW($B$2)+1),COLUMNS($E2:E2))),"")
 

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
52,883
Office Version
  1. 365
Platform
  1. Windows
How about
+Fluff v2.xlsm
ABCDEFGH
1TypeOrderAmountResultsResultsResultsResults
2Sale312800200Sale   
3Credit312900500CreditSale  
4Sale312900400CreditSale  
5Auth314200100AuthSaleCredit 
6Sale314200100AuthSaleCredit 
7Credit314200300AuthSaleCredit 
8Credit31420050AuthSaleCredit 
9Sale315100100SaleCredit  
10Credit315100200SaleCredit  
11Auth318100200Auth   
12Auth320100500AuthSale  
13Sale320100500AuthSale  
Master
Cell Formulas
RangeFormula
E2:H13E2=IFERROR(INDEX($A$2:$A$13,AGGREGATE(15,6,(ROW($A$2:$A$13)-ROW($A$2)+1)/($B$2:$B$13=$B2)/(COUNTIF($D2:D2,$A$2:$A$13)=0),1)),"")
 
Solution

pto160

Active Member
Joined
Feb 1, 2009
Messages
365
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Thanks so much. The formula works great.(y) Exactly what I am looking for.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
52,883
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

pto160

Active Member
Joined
Feb 1, 2009
Messages
365
Office Version
  1. 365
  2. 2016
Platform
  1. Windows

ADVERTISEMENT

Thanks for your help once again. What I am trying to do is combine the results from column F to column G with "/" as the delimiter and the sort order Auth/Sale/Credit in column H . I imagine I have to write a number of If statements with And or OR statements. So if (or(E2="Sale", F2="Sale". Here it is.

Unique List_Frequency.xlsx
ABCDEFGH
1TypeOrderAmountResultsResultsResultsResults I want
2Sale312800200Sale  Sale
3Credit312900500CreditSale Sale/Credit
4Sale312900400CreditSale Sale/Credit
5Auth314200100AuthSaleCreditAuth/Sale/Credit
6Sale314200100AuthSaleCreditAuth/Sale/Credit
7Credit314200300AuthSaleCreditAuth/Sale/Credit
8Credit31420050AuthSaleCreditAuth/Sale/Credit
9Sale315100100SaleCredit Sale/Credit
10Credit315100200SaleCredit Sale/Credit
11Auth318100200Auth  Auth
12Auth320100500AuthSale Auth/Sale
13Sale320100500AuthSale Auth/Sale
Sheet1
Cell Formulas
RangeFormula
E2:G13E2=IFERROR(INDEX($A$2:$A$13,AGGREGATE(15,6,(ROW($A$2:$A$13)-ROW($A$2)+1)/($B$2:$B$13=$B2)/(COUNTIF($D2:D2,$A$2:$A$13)=0),1)),"")


Is this possible?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
52,883
Office Version
  1. 365
Platform
  1. Windows
As this is a totally different question, you will need to start a new thread. Thanks
 

pto160

Active Member
Joined
Feb 1, 2009
Messages
365
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Thanks. I will start a new thread.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,437
Messages
5,596,120
Members
414,043
Latest member
thomas Stein

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
Top