SOLVED

INDEX...retrun the closesed value

%3CLINGO-SUB%20id%3D%22lingo-sub-3094196%22%20slang%3D%22en-US%22%3EINDEX...retrun%20the%20closesed%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3094196%22%20slang%3D%22en-US%22%3E%3CP%3EI%20try%20to%20have%20returned%20the%20value%20coming%20most%20closeley%20to%20the%20value%20in%20the%20matrix%3A%3C%2FP%3E%3CP%3ESpecifically%2C%20I%20try%20to%20define%20an%20insulation%20thickness%20of%20the%20pipe%2C%20depending%20on%20diameter%20and%20operating%20temperature%20%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Helmut0806_1-1643651082408.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343977iE4CB03762FA53640%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Helmut0806_1-1643651082408.png%22%20alt%3D%22Helmut0806_1-1643651082408.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20define%20the%20formular%20so%20that%20a%20thickness%20is%20defined%2C%20if%20the%20operating%20value%20does%20not%20exactly%20match%20any%20of%20the%20values%20of%20the%20matrix%2C%20but%20is%20between%20two%20of%20them%3F%3C%2FP%3E%3CP%3Eexample%3A%20if%20%C3%98508%20and%20Temp.%20380%2C%20the%20vlaue%20to%20be%20returned%20should%20be%20180%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3CP%3Ehelmut%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3094196%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3094416%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX...retrun%20the%20closesed%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3094416%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1292589%22%20target%3D%22_blank%22%3E%40Helmut0806%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DINDEX(%24C%242%3A%24I%2411%2CMATCH(B15%2C%24B%242%3A%24B%2411%2C0)%2CMATCH(B16%2C%24C%241%3A%24I%241%2C-1))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMaybe%20with%20this%20formula%20as%20shown%20in%20the%20attached%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3094535%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX...retrun%20the%20closesed%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3094535%22%20slang%3D%22en-US%22%3Ethank%20you!%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3094588%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX...retrun%20the%20closesed%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3094588%22%20slang%3D%22en-US%22%3EDankesch%C3%B6n!%3CBR%20%2F%3EFirst%20solution%20helped%20already%3B%20it%20was%20the%20%22-1%22%20missing%20%3CLI-EMOJI%20id%3D%22lia_winking-face%22%20title%3D%22%3Awinking_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
New Contributor

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 :

Helmut0806_1-1643651082408.png

 

How can I define the formular so that a thickness is defined, if the operating value does not exactly match any of the values of the matrix, but is between two of them?

example: if Ø508 and Temp. 380, the vlaue to be returned should be 180

 

Thank you!

helmut

 

5 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@Helmut0806 

=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.

thank you!

Hi@Helmut0806 ,

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.

HansLeRoy_0-1643654149061.png

Kind regards

Hans

Dankeschön!
First solution helped already; it was the "-1" missing

@Helmut0806 

-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

image.png

or its equivalent for previous Excel versions.