+ Reply to Thread
Results 1 to 11 of 11

Check Multiple Sheets For Specific Data

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Check Multiple Sheets For Specific Data

    Hi

    I need some help with a formula and I've attached an example.

    What I want to be able to do is check multiple sheets in the same worklog and summarise that data in a list on a single sheet.

    So, in the example, I want add a formula in to "Summary" worksheet to check Sheet1 and Sheet2 for a specific value in Col C. Where a match is found the data from that row would populate Summary worksheet with a list of all rows in Sheet1 and Sheet2 where there's a match.

    I know how to do this when referencing just one worksheet but not with multiple sheets. I may have up to 20 different worksheets I need to reference but I've tried to keep the example simple.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Check Multiple Sheets For Specific Data

    Maybe you can use a macro to summerize all worksheets in one.

    After that you can use pivot table, to analyze your data.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: Check Multiple Sheets For Specific Data

    Is that the only option? I've never really done any VB before so would prefer the formula option if possible.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Check Multiple Sheets For Specific Data

    And here's a possible VB option.

    VB is easier to use than to write. The hard part is really just knowing the exhaustive dictionary of possibilities, of which I'm familiar with maybe 1/100th. (And yet somehow I still limped through this )

    This simple code I've thrown together takes whatever you put in Cell D1 on the summary, and goes and finds it in column C of every other tab and lists out every match.

    To use VB, simply copy the code below, go to Excel, hit Alt+F11, Insert -> Module, paste the code in that window, and then close it.

    I've added notes through the code so you can see what it's doing. Ideally, you'd just change the range in "For Each c In ws.Range("C2:C5")" to meet your exact layout.


    Please Login or Register  to view this content.
    Something like this can be made as sleek and cool as you want. You could even have it prompt a pop-up window to ask you which Serial Number to go pull.
    Attached Files Attached Files
    Last edited by daffodil11; 05-27-2014 at 05:44 PM.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  5. #5
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: Check Multiple Sheets For Specific Data

    I can't get this script to work. I've changed the value in D1 on the summary sheet and the data doesn't update.

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Check Multiple Sheets For Specific Data

    Did you run the macro again?

    Hit Alt+F8, and run it.

    Alternatively, you could go to Insert -> Shapes, draw something like a circle, right click it, and assign the macro to it. Now you just click the circle to run it again.

  7. #7
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: Check Multiple Sheets For Specific Data

    Doh. Forgot that Told you my VB knowledge was non-existent.

    Is there a way I can get this script to autorun every time a new value is entered? Apologies if this is a very basic question.

  8. #8
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Check Multiple Sheets For Specific Data

    Everything is possible, some things are just hard. I'm pretty terrible at VB, but I know enough tricks to do this too.

    Instead of using that code in a standalone macro, we instead turn it into a worksheet_change event.

    Open VB Editor (Alt+F11), and go to the left side of the screen and double click the Sheet1(Summary) object in the little tree thingamabob.

    This is that sheet's code. We set the target range to D1 in the code, and now every time the worksheet is changed, if the change occurs in D1 the code will fire off again.


    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: Check Multiple Sheets For Specific Data

    Thanks for your help.

  10. #10
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Check Multiple Sheets For Specific Data

    Thanks for the feedback, glad I could help.


  11. #11
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: Check Multiple Sheets For Specific Data

    I've actually had time to test this script now but it doesn't work as I intend. If I change the value in D1 it just appends the result and doesn't clear the previous data.

    So, I've created a more specific example (attached) if someone could please give me some advice.

    On every worksheet, except "Summary" and "Total", I want to identify where the value 1 occurs in D2:D5 and list the data from all columns on those rows on the Summary tab.
    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. [SOLVED] How to extract specific data only and create multiple sheets
    By pahari75 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-06-2014, 11:06 PM
  2. possible to check for file in multiple folders, then check for values in specific cells?
    By mattheritage in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2014, 08:33 AM
  3. Compliation of specific Data from >2 sheets into multiple schedules
    By magnilan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2013, 05:06 AM
  4. Check the length and value of specific columns and comparion check between two sheets
    By sravanthi.boggaram in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2011, 06:51 AM
  5. remove columns with specific data in multiple sheets
    By tanakwagu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-29-2010, 07:29 AM

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