+ Reply to Thread
Results 1 to 10 of 10

Using a User Form to pull data from multiple sheets into main sheet

  1. #1
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Talking Using a User Form to pull data from multiple sheets into main sheet

    Okay bear with me, this might be a confusing/long question but I would SUPER appreciate any help...

    I have an excel workbook that contains multiple sheets of data, one for each Product (Product A, B, C, D...) in which each sheet has a table of information, and a Main sheet that I would like to display different information in.

    In each sheet, the table of data includes Column A (Item#), Column B (Quantity), Column C (Quantity * 1), Column D (Quantity * 2),
    and Column E (Quantity * 3)

    I have created a User Form in the Main sheet that allows user to select which Product (Product A, B, C, D...) and what number of Lots to produce (1, 2, 3) they would like to see data for using drop down boxes.

    SO, I would like to create a macro that, when a user chooses the Product and #, will pull all the correct data from the corresponding tabs and populate it in a blank table located in the Main sheet

    I am not super well versed in VBA so in trying to figure out this code, I started to just write out the logic from my head in a way that hopefully other people understand what I'm trying to accomplish and be able to help with... here goes nothing:

    Please Login or Register  to view this content.


    I know there MUST be an easier/more efficient way of writing this, so if you have any ideas or need more context please please let me know!

    Thank you so much!
    Attached Files Attached Files
    Last edited by sy898661; 05-31-2019 at 05:05 PM. Reason: adding code tags and attaching file

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using a User Form to pull data from multiple sheets into main sheet

    Firstly you're going to need to edit your post to follow forum rules by using code tags around your VBA.

    Then it may be a good idea to attach a desensitized version of your workbook so we can see exactly what your 'userform' consists of.

    It can certainly be written more efficiently by using variables.

    BSB

  3. #3
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Re: Using a User Form to pull data from multiple sheets into main sheet

    okay thank you I am so sorry!! I'm new at this so I don't exactly know where to find the rules or how to use code tags / what they are. I was just typing that in Word to try and figure out logic.

    I made a simplified/desensitized version of my file, I will attempt to attach it right now!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using a User Form to pull data from multiple sheets into main sheet

    If you edit your first post and highlight all the code then click the # button in the icons above the message box it will add the code tags for you.

    As for attaching the workbook, click "Go Advanced" below your reply then scroll down and click where it says "Manage Attachments". That will open the upload window and all should make sense from there.

    BSB

  5. #5
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Re: Using a User Form to pull data from multiple sheets into main sheet

    Thank you! I attached the file to the original post

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using a User Form to pull data from multiple sheets into main sheet

    What exactly needs copying to the Master BOM sheet?

    BSB

  7. #7
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Re: Using a User Form to pull data from multiple sheets into main sheet

    Just read you PM. Thank you so so much!!

    The info that needs to be copied into the Master BOM is all the Item #'s, original quantity, and then the corresponding quantity to whichever # lots was chosen (if that makes sense). Basically 3/5 of the columns in the tables from the ProductA/B/C sheets

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using a User Form to pull data from multiple sheets into main sheet

    You may need to tinker with it a little for your real workbook depending on sheet / tables names etc. but this will hopefully point you in the right direction.
    Please Login or Register  to view this content.
    BSB

  9. #9
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Re: Using a User Form to pull data from multiple sheets into main sheet

    Oh this is absolutely incredible! Thank you BSB you are amazing!!!
    It is sooo much more efficient than what I was thinking!

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using a User Form to pull data from multiple sheets into main sheet

    Happy to help

    BSB

+ 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. Matching Multiple sheets data to a main sheet
    By Ryan29 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-05-2016, 10:21 AM
  2. Populate data from one main sheet to multiple sheets
    By robi0342 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2016, 10:16 PM
  3. Populate data from one main sheet to multiple sheets
    By robi0342 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2016, 09:19 PM
  4. Pull data from multiple sheets based on cell in Main sheet
    By cpyter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2014, 01:19 PM
  5. Macro code to pull the data from different sheets to main sheet
    By Shanthuday in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2012, 09:54 AM
  6. Macro code to pull data from different sheets based on the header of the main sheet
    By Shanthuday in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-21-2012, 05:00 AM
  7. Replies: 0
    Last Post: 01-23-2012, 02:49 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