Cross referencing cells based on text?

tbush33

New Member
Joined
Oct 22, 2017
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to build a schedule and I have names in Column A and their shift assignments populated in the rest of the columns. What I would like to do is have a row below that table that will tell me which employee will be working AM and which employee would be working PM on each day. Here is an example of what I would like:
EmployeeJan 1stJan 2ndJan 3rd
AlexAMAMOFF
BrendaPMPMOFF
SusieOFFOFFAM
BobOFFOFFPM
AMAlexAlexSusie
PMBrendaBrendaBob

<tbody>
</tbody>

In the table above, I have simulated what I would like to have displayed. For the sake of explaining, we will say that the "Employee" cell is A1. So, in cells B6:D6, I would like it to reference the cells above and find which cell has the text "AM", then I would like it to find which employee is associated to that cell and display it down below. In the example above, on Jan 1st Alex works the AM shift. Excel sees the AM keyword and then displays the employee name in cell B6. I would do this manually, but with employees calling out and taking days off, it constantly changes.

If anyone could help assist me in this, I would appreciate it.

Thanks,
Travis
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi,

Try Index and Match function for this like below:

EmployeeJan 1stJan 2ndJan 3rd
AlexAMAMOFF
BrendaPMPMOFF
SusieOFFOFFAM
BobOFFOFFPM
AM=IFERROR(INDEX($A$2:$A$5,MATCH($A$6,B$2:B$5,0)),"")=IFERROR(INDEX($A$2:$A$5,MATCH($A$6,C$2:C$5,0)),"")=IFERROR(INDEX($A$2:$A$5,MATCH($A$6,D$2:D$5,0)),"")
PM=IFERROR(INDEX($A$2:$A$5,MATCH($A$7,B$2:B$5,0)),"")=IFERROR(INDEX($A$2:$A$5,MATCH($A$7,C$2:C$5,0)),"")=IFERROR(INDEX($A$2:$A$5,MATCH($A$7,D$2:D$5,0)),"")

<tbody>
</tbody><colgroup><col><col><col span="2"></colgroup>





Hope it will work for you.

Cheers !!!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

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