+ Reply to Thread
Results 1 to 7 of 7

Help with macro to search and record from multiple worksheets

  1. #1
    Registered User
    Join Date
    06-02-2015
    Location
    Cambridge
    MS-Off Ver
    2010
    Posts
    4

    Help with macro to search and record from multiple worksheets

    Hi all,

    I would really appreciate some help with developing, what I believe should be, a relatively simple solution:

    Currently, I'm exporting data from my company dashboard for around 50 projects. The data for each project is populated in individual sheets, all of which have the same structure, just different numbers populating them. What I would like to have is a summary page and a macro that:
    1. Writes the name of the worksheet
    2. Then searches through the worksheet and records the array A14:A16
    3. Then moves onto the next sheet and repeats.

    For clarification I've attached an example file which has 3 worksheets: Part X, Part Y, Part Z. The array in each worksheet I would like in my summary page is highlighted in yellow.

    Any tips/hints/solutions will be much appreciated!

    Thanks,
    Chris
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help with macro to search and record from multiple worksheets

    1) I added a row of titles to your Summary to make it more readable and froze that row at the top.

    2) I installed this macro into the Summary sheet module:
    Please Login or Register  to view this content.
    Every time you bring up the SUMMARY sheet onscreen, it will recreate itself from all the other sheets.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help with macro to search and record from multiple worksheets

    Hi Lockheed,

    Welcome to the Forum!

    I also wrote a routine for you:

    Please Login or Register  to view this content.
    *After seeing Jerry's code:

    Please Login or Register  to view this content.
    Last edited by xladept; 06-02-2015 at 02:52 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Help with macro to search and record from multiple worksheets

    See here
    Please Login or Register  to view this content.
    Last edited by PCI; 06-02-2015 at 01:12 PM. Reason: code for Border added
    - Battle without fear gives no glory - Just try

  5. #5
    Registered User
    Join Date
    06-02-2015
    Location
    Cambridge
    MS-Off Ver
    2010
    Posts
    4

    Re: Help with macro to search and record from multiple worksheets

    Hi guys, thank you all for scripts, they work brilliantly!

    Since I download the reports every week or so, rather than copying the macro I was wondering if I could make a master spreadsheet that allows me to type in the file name of the report that I have downloaded, and then runs the macro that sifts through the worksheets as above?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help with macro to search and record from multiple worksheets

    Hi Lockheed,

    The filename for this code must include the extension

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Help with macro to search and record from multiple worksheets

    A possibility could be to do nothing:
    Just load the file "LockHeed_ToolBox.xlsm" it contains the macro with a skortcut key "g"
    Load the file you need to treat e.g. "Example.xlsx" and keep it as active file and do Control + g
    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. simple macro to add new record, edit/ search and print record
    By xmoore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2015, 08:10 PM
  2. Replies: 2
    Last Post: 10-19-2012, 11:11 AM
  3. [SOLVED] Dynamic record extraction from multiple worksheets
    By quiltandcook in forum Excel General
    Replies: 0
    Last Post: 06-25-2006, 06:25 PM
  4. Sum of Categories by Record across Multiple Worksheets
    By bruce42 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-05-2005, 05:43 PM
  5. Replies: 9
    Last Post: 03-08-2005, 05:06 PM

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