Populating table VBA Macro - Look up value and populate based on time in/out

junk7

New Member
Joined
Dec 8, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hi there,

Hoping someone can point me in the right direction

I have a simple employee schedule which is populated manually, I'd like to create a macro to auto populate it based on a list of values.

So ideally the data in the Q3:R6 table will populate the cells in this example D3:L3.

Name value is unique and needs to be looked up in order to populate the times for that particular employee.

Not sure the best way to do it but was thinking on a basic level

If (AND (column B = R3,
Row2 is > Time In,
Row2 is<Time Out)
then copy and paste Job [R3] Text into individual cells,
Otherwise nothing)

The screen shot below may give you a better idea

1607465936985.png


Kind Regards
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Sorry should read

then copy and paste Job [R4] Text into individual cells!

Thanks Again!
 
Upvote 0

Forum statistics

Threads
1,214,575
Messages
6,120,334
Members
448,956
Latest member
Adamsxl

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