+ Reply to Thread
Results 1 to 10 of 10

Need help selecting data from previous 7 days as a range

  1. #1
    Registered User
    Join Date
    07-27-2018
    Location
    Seattle,Wa
    MS-Off Ver
    2016
    Posts
    11

    Need help selecting data from previous 7 days as a range

    Hi, I am attempting to set up a data log that will send out an email with the data that was entered in the cells within the last 5 days. I can get it to send an email out with a set range of values, but I am having trouble modifying that range to include entries from the previous 5 days. The dates that the data is entered is in column A. Please let me know if you have any questions or need any clarification. Thank you! Here is the code I currently have:
    Attached Files Attached Files
    Last edited by sandlinj; 08-20-2018 at 08:04 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help selecting data from previous 7 days as a range

    Welcome to the Forum sandlinj !

    It would be much more helpful to attach your actual Excel file. That way we could actually test a suggestion before we post it. With just the code we don't know what your data looks like.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-27-2018
    Location
    Seattle,Wa
    MS-Off Ver
    2016
    Posts
    11

    Re: Need help selecting data from previous 7 days as a range

    I have now attached the file. I am very new to this so my code is all over the place...
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-27-2018
    Location
    Seattle,Wa
    MS-Off Ver
    2016
    Posts
    11

    Re: Need help selecting data from previous 7 days as a range

    Thanks for the welcome Jeff!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help selecting data from previous 7 days as a range

    This assumes that your data is sorted strictly by ascending date, as in your example. I tested it with your data but it will need further dates with more expanded date ranges.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-27-2018
    Location
    Seattle,Wa
    MS-Off Ver
    2016
    Posts
    11

    Re: Need help selecting data from previous 7 days as a range

    I will add some more data and reupload. As the data is entered, it automatically pulls the date of the entry and puts it in column A so the data should always be sorted by ascending date.

  7. #7
    Registered User
    Join Date
    07-27-2018
    Location
    Seattle,Wa
    MS-Off Ver
    2016
    Posts
    11

    Re: Need help selecting data from previous 7 days as a range

    I have now included more than 7 days worth of data
    Attached Files Attached Files

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help selecting data from previous 7 days as a range

    I guess I wasn't direct enough.

    I provided a solution for free. You should test it with more data to be confident it does what you want.

  9. #9
    Registered User
    Join Date
    07-27-2018
    Location
    Seattle,Wa
    MS-Off Ver
    2016
    Posts
    11

    Re: Need help selecting data from previous 7 days as a range

    Thank you so much Jeff! With my initial tests it looks like it is doing what I want!!!

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help selecting data from previous 7 days as a range

    Good to hear--stop back again if you find any problems.

+ 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: 4
    Last Post: 03-30-2018, 10:05 AM
  2. [SOLVED] Average and Standard over the last 344 days excluding the previous 7 days
    By Renegade115 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2018, 09:16 PM
  3. Replies: 13
    Last Post: 09-22-2016, 09:18 AM
  4. [SOLVED] AVERAGEIF - Criteria is 30 previous days with data value >0
    By Karst Geek in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-06-2016, 12:07 AM
  5. Replies: 4
    Last Post: 01-06-2016, 05:38 PM
  6. Comparing dates, and selecting a days worth of data
    By RockyStrong in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-12-2008, 11:00 AM
  7. Copy old Data from web query while keeping previous days data
    By DRobidoux in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-22-2006, 10:00 AM

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