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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

junk7

New Member
Joined
Dec 8, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Sorry should read

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

Thanks Again!
 

Watch MrExcel Video

Forum statistics

Threads
1,129,330
Messages
5,635,637
Members
416,869
Latest member
JeffK26

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
Top