Two functions make this straightforward: linRegrSlope and linRegrIntercept. Suppose, for example, that you have data about cars, including their weight and mpg. The equation would then be:
Below you can see one way to use this idea - a summary table and slider set up to show the value predicted from the current slider value.
Use a formula similar to the one shown below.