Look Up Employee Hours by Date and Weekday in Excel
Question details
Create a timesheet that returns an employee's hours for each weekday by matching the employee number and date.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A weekly timesheet needs to display Monday through Friday hours from a separate employee-hours table.
- Observed behavior
- Each weekday column should show the hours recorded for the matching employee and date, or remain blank when no record exists.
Check that your source dates are actual Excel dates without time values and that employee numbers use consistent formats. The lookup solutions assume each employee-date combination appears only once.
Use XLOOKUP to Return Hours for Each Weekday
Use this approach in Excel versions that support XLOOKUP, such as Microsoft 365 and Excel 2021.
Select the source data and choose Insert > Table. Name the table Tabelle2 on the Table Design tab, and make sure its columns are named Date, employee, and hours.
Enter a Monday week-start date in A2 and an employee number in B2. Label C1 through G1 Monday through Friday.
In C2, enter =IFERROR(XLOOKUP(1,(Tabelle2[[Date]:[Date]]=$A2+COLUMN()-COLUMN($C$2))*(Tabelle2[[employee]:[employee]]=$B2),Tabelle2[[hours]:[hours]]),"").
Drag the fill handle from C2 across to G2. Add more week-start dates and employee numbers below, then fill the formulas down as needed.

Use INDEX and MATCH in Older Excel Versions
Use this alternative when XLOOKUP is unavailable.
Calculate Weekday Employee Hours in WPS Spreadsheets
Use COUNTIFS and SUMIFS in WPS Spreadsheets to display hours for each employee and weekday, leaving unmatched dates blank.
- 1. Enter the source data: In WPS Spreadsheets, create a sheet named Data. Put dates in A2:A1000, employee numbers in B2:B1000, and hours in C2:C1000.
- 2. Set up the timesheet: On another sheet, enter the Monday date in A2 and the employee number in B2. Label C1:G1 Monday through Friday.
- 3. Enter the hours formula: In C2, enter =IF(COUNTIFS(Data!$A$2:$A$1000,$A2+COLUMN()-COLUMN($C$2),Data!$B$2:$B$1000,$B2)=0,"",SUMIFS(Data!$C$2:$C$1000,Data!$A$2:$A$1000,$A2+COLUMN()-COLUMN($C$2),Data!$B$2:$B$1000,$B2)).
- 4. Fill the timesheet: Drag the fill handle from C2 across to G2 and down for other employee-week rows. Expand the source ranges in the formula if your data extends beyond row 1000.

Frequently Asked Questions
Why does the lookup return a blank when hours exist?
Check that A2 is the correct Monday, the source dates do not include times, and the employee number in B2 matches the source value and format. Also check that the table and column names in the formula match your workbook.
What happens if an employee has multiple entries on the same date?
XLOOKUP and INDEX/MATCH return the first matching entry. To total multiple entries, use SUMIFS with employee and date criteria, as shown in the WPS recommendation.
Can I use the formulas for another week?
Yes. Enter that week's Monday date in column A and the employee number in column B, then copy the weekday formulas into columns C through G on the same row.
Why does the older Excel formula need Ctrl+Shift+Enter?
Some older Excel versions require that key combination to evaluate the multiplied conditions as an array. Enter the INDEX/MATCH formula in C2 and confirm it with Ctrl+Shift+Enter if ordinary Enter does not work.




