+ Reply to Thread
Results 1 to 7 of 7

How to extract month-specific data from a master list into separate sheets?

  1. #1
    Registered User
    Join Date
    06-05-2018
    Location
    Dade City, FL
    MS-Off Ver
    2013
    Posts
    28

    How to extract month-specific data from a master list into separate sheets?

    Hello there!

    I am SUPER new to Excel and am in need of some assistance. I'm in the insurance industry and have created a call log for myself and the office. It is a basic log using VBA and UserForms for data entry. I'll upload a demo copy of what I've done so far to this post.

    As of right now, all data that is entered goes straight into the a Sheet titled, "Tracking Log." I've input a small amount of sample data using popular movie figures to show what my current product looks like. What I'm trying to figure out how to do is either one of the two below:

    1. Have the data entered into the userform get sent directly to it's corresponding date sheet (i.e. if 05/10/2018 is entered into the "Date" box in the userform, then that entry goes into the sheet titled, "May."

    OR

    2. Have each month-titled-sheet extract data from the main Tracking Log sheet in order to display month-specific information.




    Hopefully this makes sense. I've spent tons of time perusing about the internet trying to find a way to make this happen, but have been unsuccessful so far. Like I started with, I'm extremely new to Excel and VBA/Userforms/Etc. If anybody has any suggestions on how to make this happen, it would be most appreciated!


    Many thanks,


    Ben
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to extract month-specific data from a master list into separate sheets?

    I modified your cmdSave macro as shown below. See if that will populate the appropriate sheet as you add data to the Tracking Log.

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    06-05-2018
    Location
    Dade City, FL
    MS-Off Ver
    2013
    Posts
    28

    Re: How to extract month-specific data from a master list into separate sheets?

    JLGWhiz,

    Thank you!! I'll try this out this morning!


    EDIT: This seems to work marvelously!! Thank you! You've just solved a problem I've been trying to figure out for the past two months.


    SECOND EDIT: The new code worked GREAT in the Demo project that I uploaded here for you, but when I pasted it verbatim into my actual working call log that I use on a daily basis, it gives me an error stating, "Run-time error '9': Subscript out of range." When I click on the option to debug, it highlights this line:

    Set sh = Sheets(Format(Me.txtDate.Value, "mmmm"))


    I'm not sure why this is happening since it worked great in the demo. Thoughts?


    Many thanks,


    Ben
    Last edited by bgriffin4316; 06-06-2018 at 11:36 AM. Reason: New Error

  4. #4
    Registered User
    Join Date
    06-05-2018
    Location
    Dade City, FL
    MS-Off Ver
    2013
    Posts
    28

    Re: How to extract month-specific data from a master list into separate sheets?

    Any thoughts from the forum?

  5. #5
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to extract month-specific data from a master list into separate sheets?

    Set sh = Sheets(Format(Me.txtDate.Value, "mmmm"))
    This line of code initializes the sh variable with a string for the full month name based on a value frm the UserForm text box txtDate. If the UserForm source is not named the same in your actural file, then the code will need to be modified to identify the control holding the source date that the Format function uses. The Subscript out of Range message indicates that vba cannot find an object that is called out in that line of code. The Me refers to the parent of the control, the txtDate refers to the control itself. The data in the input box could conceivably cause the error if it will not format to the month name. I am not that sharp on the techie parameters of text boxes.

  6. #6
    Registered User
    Join Date
    06-05-2018
    Location
    Dade City, FL
    MS-Off Ver
    2013
    Posts
    28

    Re: How to extract month-specific data from a master list into separate sheets?

    JLGWhiz,

    Thank you for your response! I'm currently having a palm-to-forehead moment for this reason:

    Something I just realized/remembered that might be crucial would be that there is a difference between the two projects referenced above (why it took this long for me to mention, I'm not sure). In my actual, currently-being-used-daily call log, I have a second userform/macro that I'm building into the project for a secondary call log within the main one (hopefully this doesn't get too confusing). Both macros have a text box for the date, thus using the Me.txtDate.Value in the code. The Demo project I attached to my original post didn't contain this extra macro/userform.

    Could it be that the code you supplied is getting confused between the two macros with identically named components in the project and therefore returning the aforementioned error? This would then clarify why your code worked perfectly in the Demo project I supplied in my original post because that project does not contain the second macro/userform.

    Let me know what you think. As always, I greatly appreciate your help with this!!!


    Many thanks,



    Ben

  7. #7
    Registered User
    Join Date
    06-05-2018
    Location
    Dade City, FL
    MS-Off Ver
    2013
    Posts
    28

    Re: How to extract month-specific data from a master list into separate sheets?

    Any thoughts from the forum?


    Thanks,


    Ben

+ 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. Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met
    By centibttrfly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2014, 11:18 AM
  2. getting specific data from several sheets into 1 sheet as a master list
    By rod642 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-23-2014, 10:58 AM
  3. extract data from a master list
    By indesh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2013, 12:27 AM
  4. extract rows from master sheet into separate sheets
    By nikki3973 in forum Excel General
    Replies: 2
    Last Post: 07-26-2013, 12:55 PM
  5. [SOLVED] Auto extract data from master list into other sheets based off of month
    By dsklein85 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2013, 06:23 PM
  6. Replies: 4
    Last Post: 11-22-2010, 12:57 PM

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