Index and Match to exclude names with date parameters

Asuka

New Member
Joined
Jul 27, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi, I am after a formula which incorporate dates to return an individual's name in the Chair column of table 2.

Ideally, what I'm after is..

1. For the first name from the Employees table to populate into the first cell of the chair column:
a) Where the employee is still with the business (comparing today's date with the end date)
b) If a substitute date is provided also checking this against the date.

2. When it reaches the end of the Employees Name list to loop back to the top.
-> I was able to create a formula which performed the loop but I am struggling with incorporating the date elements. Looking for another way to achieve this
-> =INDEX(Employees_Table[#All], [Employee Name]], MATCH( MOD (ROWS $C$C2:C2), (4), Employees_Table!$A$2:$A$5,0))

I've included an example output table for reference.

Thank you!

Employees Table
RankEmployee NameEnd DateCurrent Employee
1Alan Doe1
2John Doe08/10/2023
3Margaret Smith1
4Zac Brown1

Table 2:
A B C
Date Substitute DateChair
02/10/2023=INDEX(Employees_Table[#All], [Employee Name]], MATCH( MOD (ROWS $C$C2:C2), (4), Employees_Table!$A$2:$A$5,0))
16/10/2023
30/10/202306/11/2023
13/11/2023
27/11/2023
11/12/2023

Example Output:
DateSubstitute DateChair
02/10/2023Alan Doe
16/10/2023Margaret Smith
30/10/202306/11/2023Zac Brown
13/11/2023Alan Doe
27/11/2023Margaret Smith
11/12/2023Zac Brown
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

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