Search for multiple values w/ one criteria but show unique values only

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
131
Office Version
  1. 365
Platform
  1. Windows
ABCDE
1Invoice NumberDate of Payment
211-Jul
311-Jul
414-Jul
514-Jul
6
7
8Invoice NumberDate of Payment
911/07/191/07/194/07/194/07/19

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
B9{=INDEX($B$2:$B$5,SMALL(IF($A$2:$A$5=$A9,ROW($B$2:$B$5)-ROW($B$2)+1),COLUMNS($B9:B9)))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Hello,

Invoice 1 was paid on two different dates.
How do I show only the unique dates instead of the way I'm currently doing (in B9)

FYI
Data is extracted data and always will show duplicate dates as shown above.

Thank you
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
with a pivot table. assuming you have headers, pick a cell in the data, ALT-D-P to start the wizard, make the fields row fields in the same order as source table

another way would be a query. ALT-D-N-N & follow the wizard. I can be more specific if you need, or google for info
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,759
Office Version
  1. 365
Platform
  1. Windows
Try
Excel Workbook
ABCD
1Invoice NumberDate of Payment
217/1/2019
317/1/2019
417/4/2019
517/4/2019
6
7
8Invoice NumberDate of Payment
917/1/20197/4/2019
Sheet
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
or

SourcePivot (Fazza)PowerQuery
Invoice NumberDate of PaymentInvoice NumberDate of PaymentInvoice NumberDate of Payment
1​
01/07/2019​
1
01/07/2019​
1​
01/07/2019​
1​
01/07/2019​
1
04/07/2019​
1​
04/07/2019​
1​
04/07/2019​
1​
04/07/2019​
M-code for PowerQuery (Get&Transform)

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    RD = Table.Distinct(Source),
    Type = Table.TransformColumnTypes(RD,{{"Date of Payment", type date}})
in
    Type[/SIZE]
 
Last edited:

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
131
Office Version
  1. 365
Platform
  1. Windows
with a pivot table. assuming you have headers, pick a cell in the data, ALT-D-P to start the wizard, make the fields row fields in the same order as source table
another way would be a query. ALT-D-N-N & follow the wizard. I can be more specific if you need, or google for info

or
M-code for PowerQuery (Get&Transform)

Thank you, I will google/youtube PowerQuery for more info.

{=IFERROR(INDEX($B$2:$B$5,SMALL(IF(FREQUENCY(IF($A$2:$A$5=$A9,$B$2:$B$5),$B$2:$B$5),ROW($B$2:$B$5)-ROW($B$2)+1),COLUMNS($B$9:B9))),"")}

Thank you, works perfectly.
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
You are welcome

Have a nice day

Horizontal option:

Invoice NumberDate of Payment.1Date of Payment.2
1​
01/07/2019​
04/07/2019​
Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"Invoice Number"}, {{"Count", each _, type table}}),
    Extract = Table.TransformColumns(Table.AddColumn(Group, "Date of Payment", each List.Distinct(Table.Column([Count],"Date of Payment"))), {"Date of Payment", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
    Parse = Table.TransformColumns(Table.SplitColumn(Extract, "Date of Payment", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Date of Payment.1", "Date of Payment.2"}),{{"Date of Payment.1", each Date.From(DateTimeZone.From(_)), type date}, {"Date of Payment.2", each Date.From(DateTimeZone.From(_)), type date}})
in
    Parse[/SIZE]
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,129,563
Messages
5,637,073
Members
416,956
Latest member
mitzhaki

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