+ Reply to Thread
Results 1 to 16 of 16

Pull data from one worksheet to another if date is within range.

  1. #1
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Pull data from one worksheet to another if date is within range.

    Hi! New here and looking for some help, i'm quite a novice excel user! Apologies if this is really obvious.

    I am creating a spreadsheet with a master page (named currently ALL), if you will, and then 12 seperate sheets/tabs, to show the information in monthly increments. What would be the best way to go about getting, for example, the January worksheet to contain all the information entered in the master page (ALL) between 01/01/17 and 31/01/17. So if cell AB3 = 25/01/2017 I want the entire row 3 data to duplicate into my January tab on the first available space.

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

    Re: Pull data from one worksheet to another if date is within range.

    It will be easier to show you this if you attached a sample Excel workbook, so we don't have to guess how your data is laid out and what you want to do with it.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Pete

  3. #3
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Re: Pull data from one worksheet to another if date is within range.

    Thanks for your reply! I have attached the spreadsheet, any help you can give me is much appreciated.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    In A3 of "JAN"

    =IFERROR(INDEX(ALL!A$3:A$1000,SMALL(IF(MONTH(ALL!$AB$3:$AB$1000)=1,ROW(ALL!$A$3:$A$1000)-ROW($A$3)+1,""),ROWS($A$3:A3))),"")

    Enter with Ctrl+Shift+Enter

    copy across and down

    For other months change 1 to 2, 3 etc

    No check for year but could be added.
    Attached Files Attached Files
    Last edited by JohnTopley; 12-01-2016 at 06:29 AM.

  5. #5
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Re: Pull data from one worksheet to another if date is within range.

    Thanks John, that worked great, aside from a section where I have a drop down list now, that doesn't seem to be pulling through. Would this need a change to the formula?

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    Where is the drop down - I can't see any in ALL? and having it should make no difference. Whatever is selected should be copied.

  7. #7
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Re: Pull data from one worksheet to another if date is within range.

    I added the drop down since the original attachment. Ah i know why, the forumla had deleted. So the last thing I wanted to do with this sheet is create multiple copies, each copy to be for different areas of the business, and for them only be able to see information relevant to their department. So is there a way that I can have the department version only pull the information through if their department is selected from my drop down list?

    I would upload but my file is over the size limit.

    The drop down appears in column K, headed Dept. I would imagine the link between the files would go something like when K = Dept 1 is true, then entire row is pulled into the local dept copy.
    Last edited by andrew8473; 12-01-2016 at 09:17 AM.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    so please post latest version!

  9. #9
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Re: Pull data from one worksheet to another if date is within range.

    Sorry, now attached
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    Password protected!!!!

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    Works fine with drop-down in K in "ALL".

    BUT if you change K value in "ALL" it will change in K in month tab! (as will any other change in "ALL")
    Attached Files Attached Files
    Last edited by JohnTopley; 12-01-2016 at 09:58 AM.

  12. #12
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Re: Pull data from one worksheet to another if date is within range.

    Password is induction

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    See post #11

  14. #14
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    13

    Re: Pull data from one worksheet to another if date is within range.

    Thanks John. The drop down is appearing fine within the workbook and pulling as necessary. What I mean though is if I create a copy of this workbook for some of the departments within that drop down menu can I formulate the copy for it to then only show that departments information.

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    If you wish to select a particular Department then use a separate drop-down of Departments independent of the one in "ALL". And how will you handle a report for more than one (or all) departments? And do you want to also select a particular month?

    So any month tab would only contain the data for the last selected department (if you have selection by department).

    Maybe you need a separate "Report" tab(s) for selecting a particular month and department.

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Pull data from one worksheet to another if date is within range.

    See attached which has tab "Dashboard" and a drop down in C1

    new formula in "JAN"

    =IFERROR(INDEX(ALL!A$3:A$1000,SMALL(IF((MONTH(ALL!$AB$3:$AB$1000)=1)*(ALL!$K$3:$K$1000=Dashboard!$C$1),ROW(ALL!$A$3:$A$1000)-ROW($A$3)+1,""),ROWS($A$3:A3))),"")

    the asterisk "*" is an AND condition so we are selecting on MONTH and DEPARMENT.
    Attached Files Attached Files

+ 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: 06-07-2016, 12:57 PM
  2. Replies: 4
    Last Post: 06-18-2013, 08:17 PM
  3. Pull data from web within date range or recent date
    By Tlandress in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-28-2013, 01:44 PM
  4. Pull data from worksheet based upon date
    By pyrofenix in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2013, 12:55 PM
  5. Pull out different data depending on date range
    By rnomis in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-18-2012, 01:53 PM
  6. expanding date range to pull corresponding data
    By jbschott in forum Excel General
    Replies: 2
    Last Post: 03-28-2010, 10:14 PM
  7. Pull Data for Specified Date Range
    By add1023 in forum Excel General
    Replies: 0
    Last Post: 03-31-2005, 10:32 AM

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