+ Reply to Thread
Results 1 to 13 of 13

conditional formatting for new data added to a spreadsheet within the last week

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Unhappy conditional formatting for new data added to a spreadsheet within the last week

    I have an excel 2007 spreadsheet with 9 columns. I want to add a formula that will change the colour of the entire row (within a set range) if something new has been added to the spreadsheet within the last week. Do you know what formula to use to do this?
    I also want to be able to change the colour of the entire row (within the same selected range) if the deadline is within 14 days.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Do you have a column which records when the data was added? Do you have another column to record the deadline date?

    Pete

  3. #3
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: conditional formatting for new data added to a spreadsheet within the last week

    There is a column with the deadline date but there is no column stating the start date just the last date worked which is not necessarily a recent date

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: conditional formatting for new data added to a spreadsheet within the last week

    So how do you expect Excel to know that data has been added within the last week?

    Pete

  5. #5
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Hi Pete, yes...I figured if it can filter data that has been added within a timeframe, there has to be a way to use a formula or conditional formatting to highlight the changed/added cells. There are a lot of article referring to this, but they do not give the steps on how to do it.

  6. #6
    Registered User
    Join Date
    06-01-2013
    Location
    Columbus, ms
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Quote Originally Posted by jingles9 View Post
    ...There are a lot of article referring to this, but they do not give the steps on how to do it.
    I think the articles you are referring to us VBA to accomplish this. It cannot be done with a formula as far as I know. You can find the reference to the last cell updated with a formula but not the cells that have been modified within the last week. Hope someone proves me wrong, though!

  7. #7
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Hi Everyone
    Thanks for your help with this. If I were to add another column to allow the user to input the date the data was added to the spreadsheet (say column A) would you know what formula to use to highlight the entire row if that data was added within the last week? I also want to know a formula to highlight the row a different colour if the data is set to expire within 14 days. The Date used for that formula would be Column F.
    There are a couple of pre-set conditional formatting examples I could use, but it only highlights the cell and not the entire row.
    Last edited by jingles9; 06-06-2013 at 07:01 AM.

  8. #8
    Registered User
    Join Date
    06-01-2013
    Location
    Columbus, ms
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I think. I'm not at a computer to validate it.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Highlight all the data that this is to apply to, and extend to a few more rows to allow for new records, e.g. from A2 to J200 (I've assumed that you have a header row). Then bring up the Conditional Formatting dialogue box, choose New Rule and then select Use a Formula ... from the bottom of the list. Put this formula in:

    =AND($A2>=TODAY()-7,$A2<=TODAY())

    Then click on the Format button | Fill tab and choose your colour. OK your way out.

    Repeat for the second condition, but this time use the formula:

    =AND($F2>=TODAY(),$F2<=TODAY()+14)

    and again click the Format button and choose your colour for the expiry condition.

    Once you exit the dialogue box (or click Apply), Excel will automatically adjust the cell references on each row to suit your data, but if you add more data in the future you can just use the Format Painter icon to apply those CFs to the new rows of data if Excel doesn't apply them automatically. Note that there is a hierarchy with conditional formatting, so if the first condition is met then that will be applied, so if expiry date is more important to you that data entry within the last week, then you can move that condition up to take priority.

    Hope this helps.

    Pete

  10. #10
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Thanks again to everyone. Is there a way to tweak the formula to also show if the expiry has passed as well?

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Is this a third condition/colour or do you want it to be included within one or both of the other conditions? For example, you might put some data in today, but the expiry date has passed (i.e. late data entry).

    It is better to ask all your questions up front rather than drip-feed them over time - some contributors get fed up with lots of new questions and can abandon the thread.

    Pete

  12. #12
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: conditional formatting for new data added to a spreadsheet within the last week

    Hi Pete
    It would be included with this formula =AND($F2>=TODAY(),$F2<=TODAY()+14)
    Thanks for the feedback...I will try to ask all questions up front. I am new to this and I didn't realize that I would need additional formulas. I figured it would automatically keep it highlighted if it had passed. I don't want to irritate anyone....sorry

  13. #13
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: conditional formatting for new data added to a spreadsheet within the last week

    OK, well that formula is only triggering the colour if the expiry date is within the next 14 days (i.e. from today up to today + 14), which is what you asked for originally. Use Edit on the CF dialogue box to amend the formula to this to accommodate your latest request:

    =AND($F2<>"",$F2<=TODAY()+14)

    As you are new you are advised to read through the Forum Rules (at the top of the screen). Note, in particular, that you can mark a thread as Solved if you consider it to be so - click on Thread Tools above your first post in this thread. Also, you can thank contributors directly by clicking on the "star" icon in the bottom left corner of any post you have found to be helpful (not just on this thread, and even on threads that you are not subscribed to). You can also attach workbooks and other files to your posts - the FAQ describes how to.

    Hope this helps.

    Pete

+ 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