Obtaining a formula for prediction limits in a linear model (i.e.: prediction intervals) Let's take the following example:
set.seed(342)
x1 <- runif(100)
x2 <- runif(100)
y <- x1+x2 + 2*x1*x2 + rnorm(100)
fit <- lm(y~x1*x2)

This creates a model of y based on x1 and x2, using a OLS regression.  If we wish to predict y for a given x_vec we could simply use the formula we get from the summary(fit).
However, what if we want to predict the lower and upper predictions of y? (for a given confidence level).
How then would we build the formula?
 A: Are you by chance after the different types of prediction intervals? The predict.lm manual page has
 ## S3 method for class 'lm'
 predict(object, newdata, se.fit = FALSE, scale = NULL, df = Inf, 
         interval = c("none", "confidence", "prediction"),
         level = 0.95, type = c("response", "terms"),
         terms = NULL, na.action = na.pass,
         pred.var = res.var/weights, weights = 1, ...)

and 

Setting
  ‘intervals’ specifies computation of confidence or prediction
  (tolerance) intervals at the specified ‘level’, sometimes referred
  to as narrow vs. wide intervals.

Is that what you had in mind?
A: @Tal: Might I suggest Kutner et al as a fabulous source for linear models.
There is the distinction between

*

*a prediction of $Y$ from an individual new observation $X_{vec}$,

*the expected value of a $Y$ conditioned on $X_{vec}$, $E(Y|X_{vec})$ and

*$Y$ from several instances of $x_{vec}$
They are all covered in detail in the text.
I think you are looking for the formula for the confidence interval around $E(Y|X_{vec})$ and that is $\hat{Y} \pm t_{1-\alpha/2}s_{\hat{Y}}$ where $t$ has $n-2$ d.f. and $s_{\hat{Y}}$ is the standard error of $\hat{Y}$, $\frac{\sigma^{2}}{n} +(X_{vec}-\bar{X})^{2}\frac{\sigma^{2}}{\sum(X_{i}-\bar{X})^{2}}$
A: You will need matrix arithmetic. I'm not sure how Excel will go with that. Anyway, here are the details.
Suppose your regression is written as $\mathbf{y} = \mathbf{X}\mathbf{\beta} + \mathbf{e}$.
Let $\mathbf{X}^*$ be a row vector containing the values of the predictors for the forecasts (in the same format as $\mathbf{X}$). Then the forecast is given by
$$
\hat{y} = \mathbf{X}^*\hat{\mathbf{\beta}} = \mathbf{X}^*(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{Y}
$$
with an associated variance
$$
\sigma^2 \left[1 + \mathbf{X}^* (\mathbf{X}'\mathbf{X})^{-1} (\mathbf{X}^*)'\right].
$$
Then a 95% prediction interval can be calculated (assuming normally distributed errors) as
$$
\hat{y} \pm 1.96 \hat{\sigma} \sqrt{1 + \mathbf{X}^* (\mathbf{X}'\mathbf{X})^{-1} (\mathbf{X}^*)'}.
$$
This takes account of the uncertainty due to the error term $e$ and the uncertainty in the coefficient estimates. However, it ignores any errors in $\mathbf{X}^*$. So if the future values of the predictors are uncertain, then the prediction interval calculated using this expression will be too narrow.
