excel - Using a dynamic range in a Index Match formula to return the max value -


i have got following formula return maximum value/its area data: =index($1:$1,0,match(max(2:2),2:2,0))

  |col  | col b  | col c  | etc. 1 |       | area 1 | area 2 | 2 |topic1 | 50.57  | 60.36  | 3 |topic2 | 467.8  | 636.8  | etc. 

in case formula return 60.36 / area 2 depending on row used in index function.

however, there no guarantee of topics present want use dynamic row reference rather fixing @ e.g. 2:2 - i.e. instead of 2:2 topic1, find maximum value in row , return either area or value (i'll need both).

i've tried using like
=index($1:$1,0,match(max(match("topic1",a:a):match("topic1",a:a)),(match("topic1",a:a):match("topic1",a:a)),0))
without success.

i suspect i'm missing obvious appreciated.

thanks in advance.

edit: sort of answered own question. in case helps else reorganized data in better format (each row: topic1|area1|value) , used =maxifs(c:c,a:a,f1) return value , =index(b:b,match(maxifs(c:c,a:a,a1),c:c,0)) return area name.

edit2: can confirm xor lx solution works - thanks!

=index($1:$1,0,match(max(index($1:$1048576,match("topic1",a:a,0),0)),index($1:$1048576,match("topic1",a:a,0),0),0))

the use of 0 column_num parameter within part:

index($1:$1048576,match("topic1",a:a,0),0)

forces function return reference entire row. is, in case, above resolves to:

index($1:$1048576,2,0)

which here equivalent to:

$2:$2

see here details of property of index.

you can refer whole worksheet using:

$a:$xfd

in place of:

$1:$1048576

though excel in case convert latter once formula committed.

regards


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -