Forum Discussion
Vlookup, Match, Index
- Nov 12, 2021
Try this:
=INDEX('J5-2'!$H$2:$H$1728,MATCH(MIN(IF('J5-2'!$I$2:$I$1728<>0,ABS(E24*1000-'J5-2'!$H$2:$H$1728),1E+300)),ABS(E24*1000-'J5-2'!$H$2:$H$1728),0))/1000
Hans,
I ran into this issue in row 29 of "Calcs-P-Delta", in column "N" it couldn't look up the corresponding actual deflection and it shows "N/A". Please see attached.
- HansVogelaarNov 12, 2021MVP
ABS(E29*1000-'J5-2'!$H$2:$H$5000) is the absolute value of the difference between E29*1000 and the values in column H on the other sheet. (Absolute value changes negative differences to positive ones)
IF('J5-2'!$I$2:$I$5000<>0,ABS(E29*1000-'J5-2'!$H$2:$H$5000),1E+300) takes these differences but replaces 0 values with an extremely large number 1E+300 = 1 followed by 300 zeros.
MIN(IF('J5-2'!$I$2:$I$5000<>0,ABS(E29*1000-'J5-2'!$H$2:$H$5000),1E+300)) computes the minimum values of these numbers. Because 0s have been replaced with a large number, the 0s are skipped.
- SamFaresNov 12, 2021Brass ContributorThank you so much Hans!
if you don't mind, could you explain to me this?
MATCH(MIN(IF('J5-2'!$I$2:$I$5000<>0,ABS(E29*1000-'J5-2'!$H$2:$H$5000),1E+300)
Thanks,
Sam - HansVogelaarNov 12, 2021MVP
See the attached version.