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?

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]X (technically merged header)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Element 1[/TD]
[TD]Element 2[/TD]
[TD]Element 3[/TD]
[TD]Element 4[/TD]
[TD]Element 5[/TD]
[TD]Element 6[/TD]
[TD]Element 7[/TD]
[TD]Column 8[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Employee 3
[/TD]
[TD]Return value from merged header above[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Employee 2[/TD]
[TD]return value from merged header above[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Employee 2[/TD]
[TD]Return value from merged header above[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Employee 1[/TD]
[TD]return value from merged header above[/TD]
[/TR]
[TR]
[TD]Y(technically merged header, different than first header above)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Element 1[/TD]
[TD]Element 2[/TD]
[TD]Element 3[/TD]
[TD]Element 4[/TD]
[TD]Element 5[/TD]
[TD]Element6[/TD]
[TD]Element 7[/TD]
[TD]Column A[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Employee 1[/TD]
[TD]return new header value directly above. should return Y[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Employee 2[/TD]
[TD]return new header value of y[/TD]
[/TR]
</tbody>[/TABLE]
 

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).
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,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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