ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can I nest Max in HLOOKUP? (https://www.excelbanter.com/excel-worksheet-functions/109862-can-i-nest-max-hlookup.html)

Cecilia

Can I nest Max in HLOOKUP?
 
Hi--

I tried to use the following:

=HLOOKUP((MAX(G6:J6)),G6:J6,2:2,FALSE)

What I want to do is pull the highest value in range G6:J6 and have that be
the lookup value to return the column heading that matches the highest value.

Here's what the table looks like:

Age 18 Age 35 Age 55 Age 65 (Row 2)

91 88 117 131 (Row 6)

I would want to identify 131 as the highest value and have the formula
return Age 65.

Thanks so much for your help!


Dave Peterson

Can I nest Max in HLOOKUP?
 
I'd use:
=index(G2:J2,match(max(g6:j6),g6:j6,0))

Cecilia wrote:

Hi--

I tried to use the following:

=HLOOKUP((MAX(G6:J6)),G6:J6,2:2,FALSE)

What I want to do is pull the highest value in range G6:J6 and have that be
the lookup value to return the column heading that matches the highest value.

Here's what the table looks like:

Age 18 Age 35 Age 55 Age 65 (Row 2)

91 88 117 131 (Row 6)

I would want to identify 131 as the highest value and have the formula
return Age 65.

Thanks so much for your help!


--

Dave Peterson


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com