Suppose my excel sheet looks like this:

| Name | Houses | Cars owned | column D |
| --- | --- | --- | --- |
| John | 3 | 3 | =A&MAX(30,3) |
| Harry | 2 | 4 | .. |
| Vik | 5 | 1 | .. |
| .. | p | k | .. |
| ... | q | n | .. |

In column D, I want to return the row in column A that corresponds to the larger of the two values in cells B2 and C2. So in cell D2, I would want to return "Vik" because the larger of the two values in B2 (3) and C2 (3) is 3. And the value in cell A3 is Vik.

So in order to arrive at my result, I would input something like ="A"&MAX(B2,C2) in D2.

But suppose my formula was a lot more complex and with different data.

```
=IFERROR(ArrayFormula(ADDRESS(MAX(index(IF($A$1:$D6=B7,ROW($A$1:$D6),""),,IF($A$1:$D6=B7,COLUMN($A$1:$D6)),"")),MAX(IF($A$1:$D6=B7,COLUMN($A$1:$D6),"")))),"")

```

and I wanted the result of the first chunk of the formula (from ADDRESS() onwards)

`MAX(index(IF($A$1:$D6=B7,ROW($A$1:$D6),"")` (which is **3**, say) to be the row number that is input into

`MAX(IF($A$3:$D3=B7,COLUMN($A$1:$D6),""))` for the range inside the IF condition.

(notice how $A$1:$D6 changed to $A$3:$D6)

So, going by the tabular example above, I would simply input `MAX(IF("$A$"&MAX(index(IF($A$1:$D6=B7,ROW($A$1:$D6),""):$D6=B7,COLUMN($A$1:$D6),""))` and that should do the trick. Except it doesn't and I get a formula parse error which I cannot resolve.

Here is the specific excel sheet I'm working on: <https://docs.google.com/spreadsheets/d/12U8U7Jp4FscobIvgr4_sADJB_oSdIHrboCk02cxF_u0/edit?usp=sharing>

Can anyone see what I'm doing wrong? The solution, I think, should be simple enough but I can't seem to figure it out.

Sorry if it's a bit long but I've been struggling with this for a while now.