Need Hellp in Multiple Dates

Santosh080

Board Regular
Joined
Jul 15, 2016
Messages
77
Office Version
  1. 2021
Platform
  1. Windows
Hello Seniors,

I have excel sheet like this,

Book1
ABC
1Account No.Deposit DATEAmount
211223318-08-201750000
322334426-10-201628600
411223309-02-201781500
511223323-10-201768000
622334416-08-20227000
733445515-07-201910000
833445509-02-20228500
922334410-07-201910000
1033445530-12-20209000
1111223314-11-20229000
1244556614-01-202250000
Sheet10



Here one account holder deposited in diffrent dates. I want to extract data to other sheet like this,


Book1
ABC
1Account No.Deposit DATEAmount
211223314-11-20229000
322334416-08-20227000
433445509-02-20228500
544556614-01-202250000
Sheet10


you can see that i need only new deposit date with amount for multiple deposit by account holders with other single deposit by account holder. Please help how can do this.

Thanks
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Book2
ABCDEFG
1Account No.Deposit DATEAmountAccount No.Last Date AmountTable1 (2).Amount
21122338/18/2017500002233448/16/20227000
322334410/26/2016286003344552/9/20228500
41122332/9/20178150011223311/14/20229000
511223310/23/2017680004455661/14/202250000
62233448/16/20227000
73344557/15/201910000
83344552/9/20228500
92233447/10/201910000
1033445512/30/20209000
1111223311/14/20229000
124455661/14/202250000
Sheet1


Load your table to Power query and Group on the Account No for Max Date

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"Account No."}, {{"Last Date Amount", each List.Max([Deposit DATE]), type datetime}})
in
    #"Grouped Rows"

Duplicate the original table and then merge it back on the above query.

Power Query:
let
    Source = Table.NestedJoin(Table1, {"Account No.", "Last Date Amount"}, #"Table1 (2)", {"Account No.", "Deposit DATE"}, "Table1 (2)", JoinKind.LeftOuter),
    #"Expanded Table1 (2)" = Table.ExpandTableColumn(Source, "Table1 (2)", {"Amount"}, {"Table1 (2).Amount"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table1 (2)",{{"Last Date Amount", type date}})
in
    #"Changed Type"
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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