Compare tables and find closed date prior to selection

Paradox_R

New Member
Joined
Jan 26, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I'm currently doing scientific work and i can't find a way to find to match 2 table to find the closest date prior to the selection. I was wondering whether you experts can help me.
As the data i'm working with is confidential i'm making a dummy table to show what i would need.

What I need to fill in is the closest matching time prior to time sit in H4, H5, ect. So the function would have to compare Table 1 with Table 2 find a row containing with exact the same Fruit, Table, Position, Chair condition. This would have multiple options and from this it has to find the closest date prior to time sit (F4,F5).

I tried to use Vlookup function but i can't figure it out as we have multiple dates for a combination.

Table 1: Client time sit
CONCATFruitTablePositionChairTime sitClosest matching time prior to time sit
Apple0300002043 Alpha 1 , Position 3Big chairApple0300002043Alpha 1 , Position 3Big chair
17/08/2021 23:05​
XX
Apple0300002043 Alpha 1 , Position 3small chairApple0300002043Alpha 1 , Position 3small chair
18/08/2021 11:11​
XX
Table 2: Clients entered
CONCATFruitTablePositionChairTime client came in
Apple0300002043 Alpha 1 , Position 3Big chairApple0300002043Alpha 1 , Position 3Big chair
17/06/2021 11:11​
Apple0300002043 Alpha 1 , Position 3Big chairApple0300002043Alpha 1 , Position 3Big chair
17/08/2021 22:11​
Apple0300002043 Alpha 1 , Position 3Big chairApple0300002043Alpha 1 , Position 3Big chair
23/08/2021 10:05​
Apple0300002043 Alpha 1 , Position 3small chairApple0300002043Alpha 1 , Position 3small chair
29/08/2021 11:11​
Apple0300002043 Alpha 1 , Position 3small chairApple0300002043Alpha 1 , Position 3small chair
20/08/2021 20:11​
Apple0300002043 Alpha 1 , Position 3small chairApple0300002043Alpha 1 , Position 3small chair
11/08/2021 15:11​
Apple0300002043 Alpha 1 , Position 3small chairApple0300002043Alpha 1 , Position 3small chair
17/08/2021 9:11​


Hoping there is a way that this is possible.

Thanks a lot in advance to help!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try this (assuming your table starts at A1)

=MAXIFS(F10:F16,A10:A16,A4)
 
Upvote 0
Try this (assuming your table starts at A1)

=MAXIFS(F10:F16,A10:A16,A4)
Hi asjmoron,

I tried the formulla but unfortunately i only get the output 0, so i is unfortunately not working
1675072959934.png
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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