Forum

Notifications
Clear all

Find closest time to given multiple criteria

3 Posts
3 Users
0 Reactions
215 Views
(@zim1984)
Posts: 1
New Member
Topic starter
 

Hello everyone!

I urgently need help with the file i'm working on. I'm just a newbie in excel and I will appreciate sharing your expertise.

I'd like to fill E4 of the closest date and time from the list in Column A considering the given criteria in cells E1 and E2.(Please see attached file)

 

I'm trying to play with INDEX and MATCH array formula but I'm not getting my desired result. 

Please help.

 
Posted : 13/12/2019 9:19 pm
(@debaser)
Posts: 836
Member Moderator
 

You can use an array formula like this:

=INDEX($A$2:$A$12,MATCH(MIN(IF($B$2:$B$12=$E$1,ABS($A$2:$A$12-$E$2))),IF($B$2:$B$12=$E$1,ABS($A$2:$A$12-$E$2)),0))

but first of all you need to convert your data into actual date/time values rather than the text theya re currently. See attached version of your workbook.

 
Posted : 14/12/2019 7:07 am
(@ali123456789)
Posts: 1
New Member
 

how can I make it 'prior to closest' ? Thanx in advance

 
Posted : 17/04/2021 4:46 am
Share: