Johnny Thunder
Well-known Member
- Joined
- Apr 9, 2010
- Messages
- 693
- Office Version
- 2016
- Platform
- MacOS
Hello all,
I am working on a project and I have come to a problem I don't know how to solve,
I have a grid of Data, Row Descriptions (Column B), and then My headers in columns "H:AP" and then the corresponding rows in between Range("H9:AP128").
So, I need code or even a formula that will go row by row, Example( Scan Row 9, if a value exists anywhere in the range of ("H9:AP9") Return the Header. I would need the returned headers to be side by side without any blanks in between.
The results can be on a secondary sheet.
Sample Layout:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Row Description[/TD]
[TD]Header1[/TD]
[TD]Header2[/TD]
[TD]Header3[/TD]
[TD]Header4[/TD]
[TD]Header5[/TD]
[/TR]
[TR]
[TD]Misc 1[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Misc 2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So for Misc 1: The returned values will look like: Header2, Header 4
So for Misc 2: The returned values will look like: Header1, Header2, Header 3
Each returned value will be in a new column left to right so that I can copy each value in one cell.
Hopefully this is somewhat clear.
I am working on a project and I have come to a problem I don't know how to solve,
I have a grid of Data, Row Descriptions (Column B), and then My headers in columns "H:AP" and then the corresponding rows in between Range("H9:AP128").
So, I need code or even a formula that will go row by row, Example( Scan Row 9, if a value exists anywhere in the range of ("H9:AP9") Return the Header. I would need the returned headers to be side by side without any blanks in between.
The results can be on a secondary sheet.
Sample Layout:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Row Description[/TD]
[TD]Header1[/TD]
[TD]Header2[/TD]
[TD]Header3[/TD]
[TD]Header4[/TD]
[TD]Header5[/TD]
[/TR]
[TR]
[TD]Misc 1[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Misc 2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So for Misc 1: The returned values will look like: Header2, Header 4
So for Misc 2: The returned values will look like: Header1, Header2, Header 3
Each returned value will be in a new column left to right so that I can copy each value in one cell.
Hopefully this is somewhat clear.