Find a value in a range (array), then spit out the Title

sg2004

New Member
Joined
Mar 20, 2009
Messages
46
I have a table with Titles along the Top and along the left.
The table displays a value which relates the 2.

I have a cell (G5) which gives the maximum value in this range.
=MAX(C12:AL47) [this range is just the values, not including titles].

I want to be able to find the G5 value in the table, and spit out the Titles, happy to do this once for the vertical and once for the horizontal titles, giving the results in 2 separate cells.

I have contemplating both Lookup and Index, but need to specify the column/row so don't understand how to do this.
Please help :)
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
What if the G5 value occurs two (or more) times in the table?
 
Upvote 0
Assuming the column titles are in row 11 and the row titles are in column B, try these formulas. Each one needs to be confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will enclose the formula in {}

For column title:
=INDEX($C$11:$AL$11,MIN(IF($C$12:$AL$47=G5,COLUMN($C$12:$AL$47)-COLUMN($C$12)+1)))

For row title:
=INDEX($B$12:$B$47,MIN(IF($C$12:$AL$47=G5,ROW($C$12:$AL$47)-ROW($C$12)+1)))
 
Upvote 0
Superstar. Thanks!

I'd appreciate understanding what that does in laymens terms if you have a minute... Otherwise it's OK and I'll try to work it out.
MUCH appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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