vba - Match absolute value and return whole column EXCEL -
we have row indicative numbers 2 largest absolute values extracted. under these indicative numbers have data spanning n rows. we'd rows each of largest indicative values.
for example:
-1.6 2.5 0.5 1.2 gh bh dh jh 12 45 45 89
the following formulas find first 2 largest values (in let's p1
, q1
):
=large(abs($a$1:$d$1),1) =large(abs($a$1:$d$1),2)
now formula below worked if largest indicatives positive:
=index(a:d,0,match($q$1,$a$1:$d$1,0))
we can't working indicatives when negative. tips appreciated. thanks.
expected output in particular case should like:
-1.6 2.5 gh bh 12 45
use array formula:
=index(a:d,0,match($q$1,abs($a$1:$d$1),0))
being array formula needs confirmed ctrl-shift-enter instead of enter when exiting edit mode. if done correctly excel put {}
around formula.
that return full column array. if want display full column. highlight enough rows show data top row active. put above formula in formula bar , hit ctrl-shift-enter.
excel fill selected cells formula in array , put {}
around each formula.
Comments
Post a Comment