+ Reply to Thread
Results 1 to 7 of 7

Conditional Formatting/Functions

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Lansing, MI
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional Formatting/Functions

    Hello all, I am brand new to this forum and really excited about the potential to learn so much from all of you!!

    I am a high school coach and part of my responsibility is to keep track of what the school refers to as "occurrences" when student athletes accrue "points" for certain violations. These points drop off after a certain time frame, for the sake of simplicity, let's say it's after one year. This is an example of what I am looking at:

    Date Amount
    04/15/2010 0.50
    04/19/2010 1.00
    05/10/2010 1.00
    07/15/2010 1.00
    08/03/2010 1.00
    09/01/2010 1.00
    09/08/2010 1.00
    10/14/2010 0.50
    11/30/2010 1.00
    02/18/2011 1.00
    05/09/2011 1.00
    06/06/2011 0.50
    06/21/2011 1.00
    08/30/2011 0.50
    08/31/2011 0.50
    09/06/2011 0.50
    09/13/2011 0.50
    09/21/2011 0.50
    10/04/2011 0.50
    10/10/2011 1.00
    10/26/2011 0.50
    10/27/2011 0.50
    12/12/2011 1.00
    02/16/2012 0.50
    03/05/2012 0.50
    06/27/2012 1.00


    I would really like to see the following happen automatically. I would like the 2nd column value to become a negative number after the date in the 1st column has expired by one year, and ideally, I would also like the values in both columns format to a red font to indicate the expiration. It's really not that bad to do it for one student manually, but I have been doing it for several students for several months and I am sure that there is a way to make this happen, although I have been unable to pinpoint the formula.

    Your assistance is greatly appreciated!!

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Conditional Formatting/Functions

    It's unclear to me:
    I would like the 2nd column value to become a negative number after the date in the 1st column has expired by one year

    Which 2nd column value? The original value or the current value?
    Explain the problem better

    The second part can easily be done using Conditional Formatting
    Click on star (*) below if this helps

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting/Functions

    without using VBA to change the contents of your "score" cells, i added a helper column in C, and then used this formula to return the negative values you wanted...

    =IF(A2<TODAY()-DATE(1,0,0),-B2,B2)

    to change the color to red, us conditional formatting, with this formula for A and B =C2<0, and just <0 for C

    let me know if this gives you what you wanted?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    09-21-2012
    Location
    Lansing, MI
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting/Functions

    I hope that this illustration helps. I am not very good at expressing what I am trying to do, I am very sorry!!
    Attached Images Attached Images

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting/Functions

    instead of uploading a pic of your sample data, it would make it much easier for us if you uploaded the actual workbook instead. many who help here are disinclined to retype all of your data for you

  6. #6
    Registered User
    Join Date
    09-21-2012
    Location
    Lansing, MI
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting/Functions

    Oh sorry!! That makes sense!!
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Conditional Formatting/Functions

    JessicaB517,

    You can use the formula:

    Please Login or Register  to view this content.
    which is basically a true or false argument, which asks "is the date in A2 less than today minus a year". If that's true, the formatting is set to red. Have a go at putting the exact same formula in Cell A2, using conditional formatting, formatting font as red, and see how you get on - you should get the same result as Column C, ie red if the date is more than a year old.
    Attached Files Attached Files
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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