Consulting

Results 1 to 3 of 3

Thread: Formula/Macro to only display figures in a cell if a certain condition is met.

  1. #1
    VBAX Newbie
    Joined
    Sep 2015
    Posts
    5
    Location

    Question Formula/Macro to only display figures in a cell if a certain condition is met.

    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

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    =IF(AND(ForCast<>"",Actual<>""),Actual-Forecast,"")
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Newbie
    Joined
    Sep 2015
    Posts
    5
    Location
    Works perfectly - Thanks Sam!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •