PDA

View Full Version : [SOLVED:] Formula/Macro to only display figures in a cell if a certain condition is met.



FShaikh
10-05-2015, 07:19 AM
So I have 3 columns: Forecast, Actual, and Variance.

The variance column has a simple formula = Actual minus Forecast.

When the Forecast and Actual fields are filled in with a date, the formula will work out the variance between them.

Is there a way to only display a variance if both the forecast and actual dates have been filled in. Ie. If only the forecast date is entered then the variance filed shows nothing, until the actual date is entered.

Muchos gracias

SamT
10-05-2015, 06:32 PM
=IF(AND(ForCast<>"",Actual<>""),Actual-Forecast,"")

FShaikh
10-08-2015, 08:05 AM
Works perfectly - Thanks Sam! :clap: