+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting for Variance - Forecasted and Actual Dates

  1. #1
    Registered User
    Join Date
    05-09-2017
    Location
    Toronto, Canada
    MS-Off Ver
    Windows 7
    Posts
    5

    Conditional Formatting for Variance - Forecasted and Actual Dates

    I have a set of forecasted and actual dates for different projects.

    I want to be able to apply conditional formatting to the actual dates that fall before the forecasted date (in green) and after the forecasted date (in red)

    See the attached file

    This is an example data set

    Capture1.PNG

    So it should look like this with the formatting

    Capture2.PNG

    Of course I have about pairs of forecasted and actual dates and about 80 on-going projects.

    I’ve created a column with the variance values and have tried to create rules using the variances as reference for the formatting.

    Where $BB$5:BB$74 is the column with the variance between the pair of forecasted and actual dates.

    Capture3.PNG

    And where$H$5:$H$74 is the column of the Actual date, the column that I want the formatting on

    Capture4.PNG
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting for Variance - Forecasted and Actual Dates

    Welcome to the forum.

    To format your table of dates, you don't need the variance columns. Using your example file, do the following:
    1. Select the range D5:AN74 (from the 'Actual Date 1' of 'Project 1' to 'Actual Date 19' of 'Project 70');
    2. Click 'Conditional Formatting', 'New Rule', 'Use a formula to determine which cells to format';
    3. Enter the formula below and choose red text as the format:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. Repeat with the formula below with green text as the format:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note that neither of these rules will format the text if the date is equal to the forecasted date. Change the > to >= for 'on or after the forecasted date' or the < to <= for 'on or before'.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    05-09-2017
    Location
    Toronto, Canada
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: Conditional Formatting for Variance - Forecasted and Actual Dates

    That is amazing, thank you SO much
    I'll do a bit of research on my own to see what these functions actually do
    but as it stands right now, the formula works perfect
    thank you

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting for Variance - Forecasted and Actual Dates

    You're welcome, glad to be of help.

    The functions are:
    AND
    AND(one thing, second thing) - so the CF will only be applied if both are true
    MOD
    MOD(number, divisor) - the remainder left over when the number is divided by the divisor.
    In this case, the number is the number of the column (A=1, B=2, etc). The divisor is 2. So even-numbered columns (B,D,F,etc) will have a remainder/modulus of 0 when divided by 2.
    COLUMN
    COLUMN() returns the column number. If you were to put in COLUMN(A1), you'd always get 1, COLUMN(B1) would always be 2, etc.
    > or <
    D5>C5 or D5<C5 just compare the dates. Dates in Excel are stored as numbers (1 = 1st Jan 1900), so a later date is a larger number.

    The reason you can use D5 without trying to specify the whole range in the CF formula is that when you apply CF to a whole range, you just need to specify the top-left cell and Excel will automatically change the cell when it looks at the rest of the range. So D5>C5 will become (invisibly) E5>D5 when Excel is CF-ing E5, etc. If you click CF then 'Manage Rules', you'll see that there is a box labelled 'Applies to'. So if/when you add more rows/columns, if Excel doesn't automatically apply the same formatting (that depends how you insert the new rows/columns), then you can expand the range from D5:AN74 to (for example) D5:AP86 by using 'Manage Rules', instead of trying to (re)apply the CF manually to the new entries.

    I hope that all makes sense. I encourage you to do some further research anyway as it's a great way to learn - just play around with a few formulae/functions and it's amazing how quickly you'll learn more. We're all still learning on here too .


    If the previous answer takes care of your original question, please take a moment to mark the thread as 'Solved' so others know there's an answer here (instructions in my sig). Thanks.

  5. #5
    Registered User
    Join Date
    05-09-2017
    Location
    Toronto, Canada
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: Conditional Formatting for Variance - Forecasted and Actual Dates

    thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 02-06-2015, 03:19 AM
  2. Calculating percentage complete based on actual and not forecasted
    By greeneggsandsam in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-16-2014, 01:23 PM
  3. Conditional Formatting with Forcasts and Actual dates
    By arleutwyler in forum Excel General
    Replies: 1
    Last Post: 10-18-2013, 12:51 AM
  4. Conditional formatting for variance column
    By erisaaka in forum Excel General
    Replies: 1
    Last Post: 10-17-2013, 10:38 PM
  5. Replies: 9
    Last Post: 06-14-2013, 04:38 AM
  6. Conditional formatting to test for variance
    By imerial in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2013, 03:51 PM
  7. Conditional Formatting using Percentage Variance
    By Skarnald in forum Excel General
    Replies: 3
    Last Post: 02-09-2012, 11:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1