Returning values from multiple headers

Excelneedhelp

New Member
Joined
Sep 18, 2018
Messages
2
Hi all,

Looking to return values from multiple headers in an excel sheet.

I have the following table for illustration:

Ideally in 'column 8' i would like to pull the value from the merged header. The problem is there are multiple merged headers running through the sheet. For illustrative purposes I have X and Y below. The element 7 or row 7 is employee IDs. There are multiple employees and each employee can be listed multiple times not only under each header but under multiple headers as well.

the goal is to return the values so eventually I can tally up how many "X"s and "Y"s each employee has in a pivot table.

The header values are all different, the only thing they share in common is that they are alphanumeric and always less than 12 digits.

Any thoughts here?

X (technically merged header)
Element 1Element 2Element 3Element 4Element 5Element 6Element 7Column 8
Employee 3
Return value from merged header above
Employee 2return value from merged header above
Employee 2Return value from merged header above
Employee 1return value from merged header above
Y(technically merged header, different than first header above)
Element 1Element 2Element 3Element 4Element 5Element6Element 7Column A
Employee 1return new header value directly above. should return Y
Employee 2return new header value of y

<tbody>
</tbody>
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Few clarifying comments:

1. By 'row 7' i meant 'column 7'
2. Element 1 or column 1 also has a 12 digit number. it is always a 12 digit number. the merged headers are different from these numbers in that they are alphanumeric and always less than 12 digits. Typically 5-7. Not sure if that can help in developing what I need.

Thank you!!
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,730
Members
449,465
Latest member
TAKLAM

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