return value based on lookup of two criteria

obiwann

Board Regular
Joined
Jan 2, 2014
Messages
142
How can I add to this formula to find the closest result in my temp. column? If I enter an exact temperature it
will return the correct result. Ex: -17.56 = 1.11759

My formula is: =INDEX(C2:C8, MATCH(G2&G3, A2:A8&B2:B8, 0))

Any help would be appreciated.

density
temp.
CTL
45
-17.78
1.1182
Density
45
45
-17.72
1.11813
Temp.
-17.6
45
-17.67
1.11795
CTL
#N/A
45
-17.61
1.11777
45
-17.56
1.11759
45
-17.50
1.11741
45
-17.44
1.11723

<tbody>
</tbody>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try:
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEF
1densitytemp.CTL
245-17.781.1182Density45
345-17.721.11813Temp.-17.6
445-17.671.11795CTL1.11777
545-17.611.11777
645-17.561.11759
745-17.51.11741
845-17.441.11723
Sheet
 
Upvote 0
You're welcome. Thanks for the feedback.
 
Upvote 0
If you want something a little fancier, this non-array formula will find the 2 bracketing values and perform linear interpolation between them:

=FORECAST(F3,OFFSET($C$2,LOOKUP(2,1/(($A$2:$A$8=F2)*($B$2:$B$8<=F3)),ROW($C$2:$C$8)-ROW($C$2)),0,2),OFFSET($B$2,LOOKUP(2,1/(($A$2:$A$8=F2)*($B$2:$B$8<=F3)),ROW($C$2:$C$8)-ROW($C$2)),0,2))
 
Upvote 0

Forum statistics

Threads
1,214,780
Messages
6,121,522
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top