Retrieving unique records from a list

bearcub

Well-known Member
Joined
May 18, 2005
Messages
701
Office Version
  1. 365
  2. 2013
  3. 2010
  4. 2007
Platform
  1. Windows
I have a table that has all the details for a commissions paid to our sales teams (~ 14 Columns).

I would like to create a unique dynamic list on another sheet that is based on the this source but I only want to extract 3 columns of data (Customer Name, Earning Group and USD amount) from the source data.

How would I create a unique list by using the Unique array function?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Can you post some sample data, including expected result.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Sure, Here is a snippet of the table. I would like to create a formula that will create a smaller table from the Credit Type, Customer and Earnings group fields. I normally take this table and compare it against a sales report.

We have 5 or 6 different earnings groups (new business, renewal, multi year renewals. Professional Services, etc). A customer can have an order that will include new business, professional services, renewal, etc. This is why I have to use these 3 columns to create a new unique list.

The credit amount field is in column F in the original table table



8. Septemberr 2023.xlsx
FGHIJKLM
1
2Credit AmountCustomer NameOrder Item CodeOrder CodeIncentive DateEarning GroupGeography NamePeriod
474,715.14ADP, Inc.NARR_2022-09-13_From_Connect0063t000011dtQ6AAI9/13/22NARREastSeptember
918,400.39Factory Mutual Insurance CompanyNARR_2022-09-20_From_Connect0063t000011dfxSAAQ9/20/22NARREastSeptember
11191,452.80VeriSign, Inc.NARR_2022-09-26_From_Connect0063t000011am5FAAQ9/26/22NARREastSeptember
14161,114.41National Grid USA Service Company Inc,NARR_2022-09-29_From_Connect0063t000011cJy1AAE9/29/22NARREastSeptember
158,576.48Neuberger Berman Group LLCNARR_2022-09-29_From_Connect0063t0000127SffAAE9/29/22NARREastSeptember
23350,000.00Blackstone Administrative Services Partnership L.P.NARR_2022-09-30_From_Connect0063t000011duipAAA9/30/22NARREastSeptember
242,080.80ChenMed, LLCNARR_2022-09-30_From_Connect0063t0000127SJUAA29/30/22NARREastSeptember
257,427.30Genworth North America CorporationNARR_2022-09-30_From_Connect0063t000011dv2KAAQ9/30/22NARREastSeptember
269,878.28Liberty Mutual Insurance CompanyNARR_2022-09-30_From_Connect0063t0000127a7cAAA9/30/22NARREastSeptember
2710,101.25Rite Aid Hdqtrs. CorpNARR_2022-09-30_From_Connect0063t000011duf1AAA9/30/22NARREastSeptember
28143,995.40Truist BankNARR_2022-09-30_From_Connect0063t0000101BgwAAE9/30/22NARREastSeptember
29303,750.00Truist BankNARR_2022-09-30_From_Connect0064X00002Bs6nvQAB9/30/22NARREastSeptember
38524,465.00The Public Joint-Stock Company “State Savings BankNARR_2022-09-30_From_Connect0063t0000117vwbAAA9/30/22NARREastern EuropeSeptember
4716,821.00CareSource Management Group CompanyNARR_2022-09-02_From_Connect0063t000011dueIAAQ9/2/22NARRCentralSeptember
51130,703.46ANZ Bank New Zealand LimitedNARR_2022-09-06_From_Connect0064X00002AUI6hQAH9/6/22NARRANZSeptember
53495,000.00Zions Bancorporation, N.A.NARR_2022-09-07_From_Connect0063t0000119BIwAAM9/7/22NARRWestSeptember
6474,715.14ADP, Inc.NARR_2022-09-13_From_Connect0063t000011dtQ6AAI9/13/22NARREastSeptember
651,200.00RedShelf, IncNARR_2022-09-13_From_Connect0063t0000127VTdAAM9/13/22NARRCentralSeptember
7220,000.00Grupo Financiero AfirmeNARR_2022-09-15_From_Connect0063t000012ucCBAAY9/15/22NARRLATAMSeptember
7924,000.00Amerisure InsuranceNARR_2022-09-20_From_Connect0063t000012wFKNAA29/20/22NARRCentralSeptember
8018,400.39Factory Mutual Insurance CompanyNARR_2022-09-20_From_Connect0063t000011dfxSAAQ9/20/22NARREastSeptember
8528,000.00Guidewire Software, Inc.NARR_2022-09-21_From_Connect0063t000012APIqAAO9/21/22NARRWestSeptember
94150,000.00California State UniversityNARR_2022-09-26_From_Connect0064X00002A97SMQAZ9/26/22NARRWestSeptember
9540,320.00ClassyNARR_2022-09-26_From_Connect0064X000029mrdmQAA9/26/22NARRWestSeptember
9622,000.00Raia Drogasil S/ANARR_2022-09-26_From_Connect0063t00000ymj3qAAA9/26/22NARRLATAMSeptember
97191,452.80VeriSign, Inc.NARR_2022-09-26_From_Connect0063t000011am5FAAQ9/26/22NARREastSeptember
Table
 
Upvote 0
Thanks for that, how about
Excel Formula:
=UNIQUE(CHOOSECOLS(F3:M28,1,2,6))
 
Upvote 0
Yes, that works, thank you! Then, if I wanted to do a custom sort I would have to define the sort a "custom sort"?
 
Upvote 0
How would you want to sort it?
 
Upvote 0
If I didn't want an alphabetical sort. Sort by earnings group - NARR, MultiYear, Professional Services, Renewal, MultiYear Renewal, for example. I would be sorting by New Business first then by Renewal
 
Upvote 0
That's not very clear, but maybe
Excel Formula:
=LET(u,UNIQUE(CHOOSECOLS(F3:M28,1,2,6)),SORTBY(u,MATCH(INDEX(u,,3),{"NARR","MultiYear","Professional Services","Renewal","MultiYear Renewal"},0)))
 
Upvote 0
Solution
Wow, thank you that is quite a formula.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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