+ Reply to Thread
Results 1 to 6 of 6

Pulling only last 30 days data from larger 'all - time' table

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    11

    Pulling only last 30 days data from larger 'all - time' table

    Hi,

    I have a sheet that contains information about product performance issues. This sheet conatins all information from the full life of the product, but i would like to be able to pull that data from just the previous 30 days to another sheet. What is the best way to do this, given that I will be inserting new data into the all time sheet as it is available and the 'last 30 days' will obviously not be the same data range every time. I am ok with having to enter the date range I want to pull to the new table if there is a way to do that as well.

    Thanks!
    Attached Files Attached Files

  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,893

    Re: Pulling only last 30 days data from larger 'all - time' table

    So, do you want to specify a start date (the end date is 30 days after that), or do you want to select a month from a drop-down and have the new table populate for the chosen month?

    Do you want all columns of the data from the main sheet to be copied across?

    Pete

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Pulling only last 30 days data from larger 'all - time' table

    HI,

    Thanks for the quick response! Yes I would like all columns to be copied (the real table has a few more columns that the example I included).

    And, Yes I would like to specify the date range because sometimes this report is run at times other than end of month, I may need to pull data from 6-18-12 to 5-18-12 for example.

    Thanks!

  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,893

    Re: Pulling only last 30 days data from larger 'all - time' table

    Okay, you don't need to specify the end date, as it will be 30 days from your start date and we can get Excel to add on those 30 days.

    I've renamed your original sheet Main, and set up a new sheet Recent. In both of them I've inserted a new column A with this formula in A2 of Main:

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


    this compares the date with the start and end dates and sets up a simple sequence for records whose date is within the range.

    In the Recent sheet you can set your starting date in cell C1 (coloured yellow). This formula in A4:

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


    finds where the records with an appropriate date in the Main sheet are located, and this formula in B4:

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


    brings the corresponding data across from column B. This formula can be copied across to E4, though you will need to change to a date format for cell C4. These formulae can then be copied down as far as you think you may need - the hypens indicate how far you have copied.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Pulling only last 30 days data from larger 'all - time' table

    Thank you this is great

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Pulling only last 30 days data from larger 'all - time' table

    @ frichmond

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ 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