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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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
please show the formula in your snippet as well as the location of the original data
HI Dermie,

Please see below,

1713503576986.png


Pulls the data from the April sheet (below)

1713503644395.png


Many thanks for your help
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,215,477
Messages
6,125,036
Members
449,205
Latest member
Eggy66

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