Match/Index/Lookups?

SwiftM

New Member
Joined
Sep 11, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi Excel Gurus,

Need a little help which i have been scratching my tiny brain over!! Any help would be very much appreciated!!

1713291725419.png


As you can see above, I have the days and dates of a month on a sheet called "April". What I want to achieve on a different sheet called "Employees" is a table where when I load up the workbook it populates which employee is working a D, L, or N shift. Heres the table which i want to populate automatically:

1713292459833.png


So basically in cell H3 for example, I would ideally like it to look up the date above in Row 2 which is the 7th, then find the 7th in the worksheet "April" and find the employee who is working a D on that date from looking in column A (employees). This would be the case for all the cells so some sort of VBA coding I imagine would be best?

How would this be done as I genuinely have no idea?

Many thanks for your help.
M
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I used the table you provided and named the sheets April and Employees.In Cells B3:AE8 enter the following formula into B3 and press control Enter.
Excel Formula:
=IFERROR(INDEX(April!$A16:$A$20,MATCH(Employees!$A3,April!C16:C$20,0)),"")
Or enter it into B3 and drag across and drag down to row 8
The index needs to encompass all the employees so adjust your range for the real data.
When it came to L in row 10 I changed the formula to :
Excel Formula:
=IFERROR(INDEX(April!$A16:$A$20,MATCH(Employees!$A10,April!C16:C$20,0)),"")
See if that works.
 
Upvote 0
I used the table you provided and named the sheets April and Employees.In Cells B3:AE8 enter the following formula into B3 and press control Enter.
Excel Formula:
=IFERROR(INDEX(April!$A16:$A$20,MATCH(Employees!$A3,April!C16:C$20,0)),"")
Or enter it into B3 and drag across and drag down to row 8
The index needs to encompass all the employees so adjust your range for the real data.
When it came to L in row 10 I changed the formula to :
Excel Formula:
=IFERROR(INDEX(April!$A16:$A$20,MATCH(Employees!$A10,April!C16:C$20,0)),"")
See if that works.
Hi Dermie,

Thank you for the reply and for your help!!

I have inserted the formulas you provided but the value returned is "0" and not the name of the employee working a D or L. i.e. Employee 1, Employee 2 etc

Here's a small snippet of the D table result:

1713361583158.png


Can you suggest what the issue may be?

Cheers,
M
 
Upvote 0
Sorry I've been away. Checking the data. It looks like you're looking in Column A for the Index, where the employees name is in Column B.
So the formula was returning a blank cell which equates to 0. Checnhe that to $B16:$B$20 and adjust the numbers for each range and it should work.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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