Interpolation and Extrapolation in Excel
This trick will save you time to do interpolation and extrapolation out from a table in Excel. It is powered by VBA or Macro using a user-defined function.
Description of Example
We have a table of thermal expansion of carbon steel at different change in temperature. The objective is to find the value of expansion at 35 degrees Celsius in reference to the given table.

The screen recording below shows how to use the user-defined function 'InterpolateTable()'.

Creating the User-Defined Function
Step 1. Go to 'Developer' menu, then choose 'Visual Basic'
See below figure.

Step 2. Right-click from the left side panel of the new window, then choose 'Insert' > 'Module'.
See below figure.

Step 3. Copy and paste the following VBA code to the new module that has been created. Your screen must be similar to this screenshot.

Step 4. Close the VBA window and use the newly created function by typing =InterpolateTable(). See below figure and screen recording.


About Us
Excelcrib was founded in November 2017 by Garry, a Microsoft® Office Excel® (MS Excel) enthusiast with background in engineering. He's been using MS Excel for more than 15 years in practice with specialty in VBA.
Contact Us
Follow Us
© Copyright 2023 Excelcrib | Privacy Policy