calculate start time from default matrix

robertvdb

Active Member
Joined
Jan 10, 2021
Messages
327
Office Version
  1. 2016
Platform
  1. Windows
This shouldn't be too difficult but I can't find it...

I have a few employees, whose working hours vary throughout the year. Their start and end times vary.

The default times are in yellow.

Now, when I enter their names in the daily log, the default times for that particular date should appear in col C and D.

Any help is appreciated.
 

Attachments

  • start_end.png
    start_end.png
    23.3 KB · Views: 8

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
in C11
=index(C$2:C$5,match($A11, $A$2:$A$5,0))
copy to end date D11 - should be
=index(D$2:D$5,match($A11, $A$2:$A$5,0))

and copy down
 
Upvote 0
Thanks Etaf, but I should also involve column B.

If the date in B11 is larger than 1st February, then this affects the outcome in C11.
 
Upvote 0
=INDEX(C$2:C$5,MATCH($B11,IF($A$2:$A$5=$A11,$B$2:$B$5),1))

lookup 2 criteria and 1 nearest.xlsx
ABCD
1namedatestartstop
2john1/1/239:0017:00
3bob1/1/2310:0018:00
4john2/1/2311:0019:00
5bob2/1/2313:0015:00
6
7
8
9
10namedatestartstop
11john1/15/239:0017:00
12john2/15/2311:0019:00
Sheet2
Cell Formulas
RangeFormula
C11:D12C11=INDEX(C$2:C$5,MATCH($B11,IF($A$2:$A$5=$A11,$B$2:$B$5),1))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,140
Messages
6,123,269
Members
449,093
Latest member
Vincent Khandagale

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