Forum Discussion
Helmut0806
Jan 31, 2022Copper Contributor
INDEX...retrun the closesed value
I try to have returned the value coming most closeley to the value in the matrix: Specifically, I try to define an insulation thickness of the pipe, depending on diameter and operating temperature :...
- Jan 31, 2022
=INDEX($C$2:$I$11,MATCH(B15,$B$2:$B$11,0),MATCH(B16,$C$1:$I$1,-1))
Maybe with this formula as shown in the attached file.
hansleroy
Jan 31, 2022Iron Contributor
HiHelmut0806 ,
If you order the values in ascending order, I can think of a solution in two steps: list intermediate values, and search them with HLOOKUP.
Kind regards
Hans
Helmut0806
Jan 31, 2022Copper Contributor
Dankeschön!
First solution helped already; it was the "-1" missing 😉
First solution helped already; it was the "-1" missing 😉
- SergeiBaklanJan 31, 2022Diamond Contributor
-1 returns next smaller item, not the closest one. If you are 365 or 2021 that could be like
=XLOOKUP( 0, ABS( $B$17 - $B$3:$B$14), XLOOKUP(0,ABS(B16-$C$2:$L$2),$C$3:$L$14,,1),,1 )for
or its equivalent for previous Excel versions.