Return a Column Heading using a formula

MrOverheads

New Member
Joined
May 29, 2015
Messages
2
I have no idea how to use VBA so looking for a formula solution.

Data Looks Like:

Ref 1
Ref 2
Ref 3Ref 4Ref 5Ref 6Ref 7Ref 8
Heading 1Heading 2
Heading 3Heading 4Heading 5Heading 6Heading 7Heading 8Reference
NoNoNoNoNo
Yes
n/an/a ?
NoNoNoYes
n/an/an/an/a ?
NoNoNoNo
Yes
n/an/an/a ?
NoNo
Yes
Non/an/an/an/a ?

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

So what I'm trying to do is put a formula where the "?"'s are. The result should be the red description at the top of the column where the Blue "Yes" is for each row. i.e. when finished table should look like:

Ref 1
Ref 2
Ref 3Ref 4Ref 5
Ref 6Ref 7Ref 8
Heading 1Heading 2
Heading 3Heading 4Heading 5
Heading 6
Heading 7Heading 8Reference
NoNoNoNoNo
Yes
n/an/a Ref 6
NoNoNoYes
n/a
n/an/an/a Ref 4
NoNoNoNo
Yes
n/an/an/a Ref 5
NoNo
Yes
Non/a
n/an/an/a Ref 3

<tbody>
</tbody>

Doens't seem liek it would be ahrd to do, but my complex combination of Vlookup, hlookup and offsets isn't working must be an easier way i.e. Find the column with "Yes" and return the contents of cell in Row 1 of that column.

Hope somebody can help please.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Welcome to the board.

Assuming your data starts in A1, try this in I3 and copy down:

=INDEX($A$1:$H$1,,MATCH("Yes",A3:H3,0))

Or, if you literally just want to return the reference to the column number:

="Ref "&MATCH("Yes",A3:H3,0)
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

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