+ Reply to Thread
Results 1 to 13 of 13

macro to look through all available sheets in a workbook

  1. #1
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    macro to look through all available sheets in a workbook

    I need a macro that will search all available sheets in a workbook for a name and return data for that name under specific column labels..

    Results Sheet:
    Name
    Shel clark

    Date
    1/1/2014

    Total Hrs
    8

    Break Duration
    30

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: macro to look through all available sheets in a workbook

    Hello Shellybelly,

    Will the headers always be in the same columns on each sheet?

    Where will the results be output to?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: macro to look through all available sheets in a workbook

    Yes the headers will always be the same in the same on each sheet.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: macro to look through all available sheets in a workbook

    Hello Shellybelly,

    Once the name and associated information are found, where is it to be pasted?

  5. #5
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: macro to look through all available sheets in a workbook

    It will be paste in a sheet name Reg Search. the name will be typed in column b3 in the reg search tab and all the info for that person recorded for each day will be paste under the same columns that is in all the other sheets.

  6. #6
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: macro to look through all available sheets in a workbook

    Any Luck yet Leith Ross?

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro to look through all available sheets in a workbook

    Maybe:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: macro to look through all available sheets in a workbook

    Hi JOHN H. DAVIS I tried the macro but no luck.

    I've attached the sheet so you can see. I've tried a macro to put the search results in a message box but no luck. I only got the sheet name and the cell the name was found. when i try your code nothing happens. Maybe I am doing something wrong.

    I've attached the sheet for more help.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro to look through all available sheets in a workbook

    You're layout doesn't represent what you said. You have 4 sheets. "Reg Search" - OK. "RegBuilder", "Tuesday.." and "Schedules". In which sheet should we search (all the headers and columns do not coincide) and return the data you want? Also the data you requested in Post 1, is not the same as the header information on these sheets? Your request was to search each sheet and the layout would be the same for all sheets. Are there sheets you want too exclude? Please clarify.

  10. #10
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: macro to look through all available sheets in a workbook

    the data should be pulled from the sheets with the date names. everyday there will be a new sheet with a date name. The macro should look through the entire workbook except regbuilder, reg search and schedules and return data found in the sheets with the date name.

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro to look through all available sheets in a workbook

    Test this with some names to see if it does what you want.

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: macro to look through all available sheets in a workbook

    Thanks alot....you save me some time big time

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro to look through all available sheets in a workbook

    You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as solved.

+ 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. [SOLVED] Macro to copy cells from multiple sheets in workbook to multiple sheets in other workbook
    By KeithMale in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 05:37 PM
  2. [SOLVED] copy all sheets from one workbook to the workbook running the macro
    By synergio in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-28-2012, 06:20 AM
  3. Extracting Data from 2 sheets & Placing in other 2 sheets of same workbook using VBA Macro
    By ukash.dost@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2012, 08:56 AM
  4. Macro To Merge All Sheets In Workbook Into New Workbook
    By JimmiOO in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-06-2010, 09:38 AM
  5. [SOLVED] Macro for filter on protected workbook that works for all sheets, no matter what sheets are named?
    By StargateFanFromWork in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2006, 02:35 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