Using HLOOKUP with merged cells

ATSJ

Board Regular
Joined
Dec 7, 2010
Messages
58
I have a table where the header row is three merged cells and there are multiple columns below corresponding to that title. What I need is a formula that looks up (presumably using HLOOKUP) the name, before then finding the maximum value on any row below.

Person A
Person B

<tbody>
</tbody>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

<tbody>
</tbody>

So a search for Person B looking for the maximum value on row 3 would return the value 12.

OR

a search for Person A, finding the max value for them on row 5 would return the value 21.

Any help is appreciated.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
If your sample really is that simple...
G​
H​
I​
J​
K​
L​
1​
Person A​
Person B​
2​
123456
3​
789101112
4​
131415161718
5​
192021222324
6​
7​
PersonbRow3Max
12​
L7=MAX(OFFSET($G$1,$J$7-1,MATCH($G$7&" "&$H$7,$G$1:$L$1,0)-1,1,3))
 
Upvote 0

Forum statistics

Threads
1,190,795
Messages
5,982,963
Members
439,808
Latest member
agutosay

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
Top