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

#### sg2004

##### New Member
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.

### Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

#### Peter_SSs

##### MrExcel MVP, Moderator
What if the G5 value occurs two (or more) times in the table?

#### sg2004

##### New Member
it is a very precise number. If it does it will be like winning the lotto.

#### Peter_SSs

##### MrExcel MVP, Moderator
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)))

#### sg2004

##### New Member
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.

Replies
3
Views
201
Replies
7
Views
5K
Replies
9
Views
274
Replies
7
Views
456
Replies
0
Views
620

1,191,672
Messages
5,987,959
Members
440,122
Latest member
branhill

### 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?

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