+ Reply to Thread
Results 1 to 12 of 12

VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

  1. #1
    Registered User
    Join Date
    06-26-2018
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    5

    VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Hello, I have around 30 worksheets in this workbook and around 16 of them are recipes. New worksheets will be added each time a new recipe gets added into the workbook. I need VBA to find each recipe and then extract cell A2 by copying and pasting into a worksheet called "Menu Organization" Cell C5, from there in needs to find recipe 2, paste into cell C6, recipe 3 paste into cell C7 and so on. I can get it to cycle through each worksheet and find recipes which have a trigger in cell B1. It then moves the information in Cell A2, but it does not go to the next row, it keeps copying over the existing cell C5. It needs to be dynamic based on when new recipes are added. Can someone help me figure out what I am missing?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    One item I wanted to mention is that there should be no need to activate sheets, I believe if I follow the code correctly you can drop this line in your for each wSheet loop:

    Please Login or Register  to view this content.
    and change:
    ActiveSheet.Range("A2").Copy to wSheet.Range("A2").Copy

    As for your C5 problem..

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    06-26-2018
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    5

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    It did not work, as there is something wrong with the copying and pasting. I need to keep working on that offset function.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Can you attach a sample workbook?

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    06-26-2018
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    5

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Ok I should have loaded an example.

    Each recipe name should pull into the master sheet.
    Attached Files Attached Files

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Please Login or Register  to view this content.
    Produced:

    recipes.jpg

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    As you can see from the image, using the code I posted above, 15 recipes are listed... which I believe is all of them?

  8. #8
    Registered User
    Join Date
    06-26-2018
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    5

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Ok. That works perfectly!. I just need to figure out now how to first delete the information in those cells, because I need it to overwrite, not add on. If you click the macro twice it adds another set of rows below it. If you know how to fix that, that would be amazing. If not I'll continue to work on it. Thanks!

  9. #9
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    BEFORE the "For Each wSheet..." loop, insert:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-26-2018
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    5

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Alright. Thank you. We can mark this thread as now solved. For one, I feel this is a very important piece of code that is overlooked in most threads. Thank you for your help.

  11. #11
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    Glad I could help
    I can't mark your thread as solved though... That is up to you please.

  12. #12
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet

    To mark as solved, Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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: 1
    Last Post: 03-06-2018, 11:46 AM
  2. [SOLVED] Extract Invoice Information from Source Data Sheet to Individual Worksheets
    By HangMan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2015, 11:37 AM
  3. How to automatically extract information from email attachment to master sheet.
    By Adamsports in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2014, 02:11 PM
  4. Pull data from specific cells on multiple worksheets onto one master sheet
    By WorkforceMedia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2013, 03:25 AM
  5. updating individual worksheets when specific person is selected on master sheet
    By malakluseczka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2012, 08:26 AM
  6. [SOLVED] Link cell from a dynamically generated sheet to a master sheet
    By stockfeed in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-04-2012, 07:26 PM
  7. Replies: 26
    Last Post: 04-25-2012, 01:16 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