How can you include a maximum date criteria into a =FILTER function with other filter criteria?

gck67

New Member
Joined
Nov 25, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

I would like to use the =FILTER function to return a dynamic array using two criteria: (1) A user specified "request_id" and (2) The maximum value of the "download_date_time" attribute for the records with the user specified request_id. In other words, extract the latest record for the specified request_id. Only one record should be returned.

It seems like a pretty straight forward use case, but I have had no success googeling for an answer to this. I must be over-looking something very obvious :()

Any help would be very much appreciated.

Thank you,
Greg

example_latest_approval_stage.xlsx
ABCDEFGHIJKL
4
5request_id100
6download_date_timerequest_idstatusassigned_toapproval_unit
701.Jan.2023 10:10100openjonmgmt_101.Jan.2023 10:10100openjonmgmt_1
802.Jan.2023 10:10110openmarymgmt_207.Jan.2023 10:10100recruitingjonmgmt_1
903.Jan.2023 10:10120openbillmgmt_3
1004.Jan.2023 10:10130openjeanmgmt_1
1105.Jan.2023 10:10140openbobmgmt_2
1206.Jan.2023 10:10150openannmgmt_3
1307.Jan.2023 10:10100recruitingjonmgmt_1
1408.Jan.2023 10:10110closedmarymgmt_2
1509.Jan.2023 10:10120filledbillmgmt_3
1610.Jan.2023 10:10130cancelledjeanmgmt_1
1711.Jan.2023 10:10140openbobmgmt_2
1812.Jan.2023 10:10150openannmgmt_3
19
Sheet1
Cell Formulas
RangeFormula
H7:L8H7=FILTER(tbl_status, tbl_status[request_id]=I5,)
Dynamic array formulas.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi & welcome to MrExcel.
If your dates are always sorted ascending then how about
Excel Formula:
=TAKE(FILTER(tbl_status, tbl_status[request_id]=I5,),-1)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
If your dates are always sorted ascending then how about
Excel Formula:
=TAKE(FILTER(tbl_status, tbl_status[request_id]=I5,),-1)
Hello Fluff,

Yes! That works perfectly. Thank you so much!

Thank you also for the welcome to MrExcel.

I won't mention how many hours I spent this morning googeling and looking through YT videos - and to get this answer in just a few minutes here in this forum. Wow, amazing - thank you, again.

Best regards,
Greg
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,126
Messages
6,123,200
Members
449,090
Latest member
bes000

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