matching two data sets, of different sizes where one is horizontal

Avit

Board Regular
Joined
Jan 9, 2013
Messages
80
Platform
  1. MacOS
Hi All,

Would really appreciate help on this one:
I have the following simplified table:
DateName 1Name 2Name 3Name 4Name 5
1/1/2020JohnJackMichael
1/2/2020JackTimJeffShawn
1/1/2020TimJeff
1/3/2020DavidJohnTimTom
1/2/2020JohnMichael
1/2/2020JimShawn
1/1/2020DavidDavidShawn
1/3/2020MichaelJack


I need to match each one of these people to their role on their team (let's say, "Manager", "Member" and "Other" based on a second vertical dataset. Let's also assume, that each of the people can be in any of the 3 roles for any given "shift". (but just on one role for that shift).
so, for example
DateNameRole
1/1/2020TimManager
1/1/2020JohnMember
1/1/2020JackManager
1/12020MichaelOther
1/2/2020JohnOther
1/2/2020TomMember
1/2/2020TimManager
1/3/2020DavidMember
1/3/2020JohnMember

.Let's also assume that each of the "jobs" (on the first table), might or might not have a manger (usually if there is no manager, than the only name that appears is an "other":
Please also note that the tables are not exactly equal (there is some data missing in the second table, that exists in the first).

I want to match the second table with the first one, so that I can create an additional table of the same size as the first (9x6), but instead of names, I will see the roles they play. so for example in the first row instead of the names John, Jack and Michael, I will see Member, Manager, Other

I appreciate any help on this one.

Thanks!!
 
Thanks again.
The problem is I am actually working on google sheet and not excel (I am not a fan, but it's not up to me), and am very limited in getting add-ons. So power query might not be feasible for me.
Is there a traditional way to do this? My initial assumption was some kind of mix of matches and indexes and maybe an array, which I just couldn't figure out. I in fact tried some kind of array myself but failed miserably...
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
so your thread should be posted here: General Excel Discussion & Other Questions
and would be fine if you update your profile about Excel / Platform version
version.png

and I don't know any solution for GoogleSheet
 
Upvote 0
Thank you, I will do that.
My assumption was that if there is a traditional (not power query) solution, it should also work for google sheets, as it does for excel.
I will of course try on the other forum.

And if there's anyone else who might be able to take a shot, I would be very very thankful.
 
Upvote 0
You are welcome
it should also work for google sheets, as it does for excel
not everything from Excel works on GoogleSheet :cool:
ask moderator via Report to move this thread to appropriate forum
 
Upvote 0
I have moved the thread.
I also do not know Google sheets so cannot advise.
Also, expected results for one row is not very informative when expected results for 9 rows has been requested.
Remember that you are very familiar with your worksheet, data and requirements, but helpers here are not.
 
Upvote 0
Thanks all,
Solved using array formula + index with two matches.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

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