Forum

Lookup Pay Dates fr...
 
Notifications
Clear all

[Solved] Lookup Pay Dates from Calendar and Timesheet

5 Posts
2 Users
0 Reactions
340 Views
(@ingaiyoung)
Posts: 18
Eminent Member
Topic starter
 

The formula I am currently using is:

=INDEX('2025'!D:D,MATCH(1,('2025'!A:A<=[@[Pay_Period_Ending_Date]])*('2025'!B:B>=[@[Pay_Period_Ending_Date]]),0))

What I am trying to do lookup calendar dates between a two week period from our Payroll Calendar that represents a pay date to timesheet worked date.  The timesheet worked date will have many entries for an employee that are used to calculate the hours paid in a pay period.

Is there a better way to do this?

 
Posted : 12/02/2025 1:35 am
Riny van Eekelen
(@riny)
Posts: 1196
Member Moderator
 

Difficult to judge if there is "a better way" without seeing the file. Though, in general, one should avoid using entire-column references like D:D, A:A etc. 

Furthermore, that formula will only return 1 value (if I'm not mistaken), whereas you mention to lookup multiple dates.

 
Posted : 12/02/2025 2:23 am
(@ingaiyoung)
Posts: 18
Eminent Member
Topic starter
 

Here is an example file

 

 

 

 
Posted : 12/02/2025 3:39 am
(@ingaiyoung)
Posts: 18
Eminent Member
Topic starter
 

I was able use the FILTER function to obtain the correct result in my spreadsheet.  Thanks.

 
Posted : 12/02/2025 2:44 pm
Riny van Eekelen
(@riny)
Posts: 1196
Member Moderator
 

@ingaiyoung 

Great that you resolved it yourself, though I would still like to share two other solutions.

The first considerable boosts performance (at least on my old MacBook Air) and that's by eliminating the whole-column references in K. The other is to use XLOOKUP as included in column O.

 

 
Posted : 12/02/2025 4:09 pm
Share: