+ Reply to Thread
Results 1 to 6 of 6

How to search across a Workbook and copy the returned data to a worksheet?

  1. #1
    Registered User
    Join Date
    03-06-2016
    Location
    LA
    MS-Off Ver
    2013
    Posts
    4

    How to search across a Workbook and copy the returned data to a worksheet?

    Hi everyone, I'm going through my bank records from 2014 and Wells Fargo only provides statements in the form of PDF's. I was able to convert the PDF to excel and the output is great. However, the converter I used created an individual worksheet for each page that exists in the PDF. Not a problem really.

    However...

    In Excel I was hoping to Search (CTRL F) for the term "Shell Gas" and have it search the entire Workbook. I have gotten this far and I see the results in the FIND/REPLACE window.

    The problem is I need a way to copy all that data to a single Worksheet so I can then Auto Sum it.

    In a nutshell: I want to search across a workbook and copy the search results to a single worksheet that I can auto sum the totals.

    Is this possible? I can't imagine going through every line by line.

    Thanks!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: How to search across a Workbook and copy the returned data to a worksheet?

    Hi, welcome to the forum

    Instead of copying all the data to a new sheet, why not just sum it all to a new sheet?

    This is fairly easy to do, follow these steps...

    1. create a list of sheet names. If you dont have that many, just type them into the list
    If you have lots, then use the UDF (User Defined Function)
    ...Create a range name and call it SheetNames (rght click any cell, select Define Names)
    ...in the Refers to: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")
    ...click OK

    To get a list of sheet names, put this in a cell and copy down (started in A2)...
    =IFERROR(INDEX(Sheetnames,ROWS($A$2:A2)),"")

    If you want to be able to click the cell and go to that worksheet, change that formula to this...
    =IFERROR(HYPERLINK("#"&"'"&INDEX(Sheetnames,ROWS($A$2:A2))&"'!A1",INDEX(Sheetnames,ROWS($A$2:A2))),"")

    Now you have a list of sheet names. To do the sum, use this (adjust ranges as needed)...

    Sum across sheets =SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetnames&"'!T6:T1000"),C794,INDIRECT("'"&Sheetnames&"'!M6:M1000")))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: How to search across a Workbook and copy the returned data to a worksheet?

    Hi, welcome to the forum

    Instead of copying all the data to a new sheet, why not just sum it all to a new sheet?

    This is fairly easy to do, follow these steps...

    1. create a list of sheet names. If you dont have that many, just type them into the list
    If you have lots, then use the UDF (User Defined Function)
    ...Create a range name and call it SheetNames (rght click any cell, select Define Names)
    ...in the Refers to: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")
    ...click OK

    To get a list of sheet names, put this in a cell and copy down (started in A2)...
    =IFERROR(INDEX(Sheetnames,ROWS($A$2:A2)),"")

    If you want to be able to click the cell and go to that worksheet, change that formula to this...
    =IFERROR(HYPERLINK("#"&"'"&INDEX(Sheetnames,ROWS($A$2:A2))&"'!A1",INDEX(Sheetnames,ROWS($A$2:A2))),"")

    Now you have a list of sheet names. To do the sum, use this (adjust ranges as needed)...

    Sum across sheets =SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetnames&"'!T6:T1000"),C794,INDIRECT("'"&Sheetnames&"'!M6:M1000")))

  4. #4
    Registered User
    Join Date
    03-06-2016
    Location
    LA
    MS-Off Ver
    2013
    Posts
    4

    Re: How to search across a Workbook and copy the returned data to a worksheet?

    Wow guys this is WAY over my head. I'm just a beginner excel user lol

  5. #5
    Registered User
    Join Date
    03-06-2016
    Location
    LA
    MS-Off Ver
    2013
    Posts
    4

    Re: How to search across a Workbook and copy the returned data to a worksheet?

    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    Instead of copying all the data to a new sheet, why not just sum it all to a new sheet?

    This is fairly easy to do, follow these steps...

    1. create a list of sheet names. If you dont have that many, just type them into the list
    If you have lots, then use the UDF (User Defined Function)
    ...Create a range name and call it SheetNames (rght click any cell, select Define Names)
    ...in the Refers to: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")
    ...click OK

    To get a list of sheet names, put this in a cell and copy down (started in A2)...
    =IFERROR(INDEX(Sheetnames,ROWS($A$2:A2)),"")

    If you want to be able to click the cell and go to that worksheet, change that formula to this...
    =IFERROR(HYPERLINK("#"&"'"&INDEX(Sheetnames,ROWS($A$2:A2))&"'!A1",INDEX(Sheetnames,ROWS($A$2:A2))),"")

    Now you have a list of sheet names. To do the sum, use this (adjust ranges as needed)...

    Sum across sheets =SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetnames&"'!T6:T1000"),C794,INDIRECT("'"&Sheetnames&"'!M6:M1000")))
    Thanks admin! I'm just a beginner tho

  6. #6
    Registered User
    Join Date
    03-06-2016
    Location
    LA
    MS-Off Ver
    2013
    Posts
    4

    Re: How to search across a Workbook and copy the returned data to a worksheet?

    Any other way? This is way over my head.

+ 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. Search worksheet in another workbook and pull matching Data
    By erjp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2015, 05:06 AM
  2. Search in worksheet and copy data
    By Dagged in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-31-2013, 03:35 PM
  3. [SOLVED] search multiple worksheets in workbook for keyword then copy entire row to new worksheet
    By sck22 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2012, 02:22 AM
  4. Search Data from Multiple Sheets and copy found data to new workbook
    By xenith1988 in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 06-26-2012, 12:58 PM
  5. [SOLVED] Macro to search cell data and copy data to another workbook
    By ucsutah in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2012, 12:08 AM
  6. [SOLVED] Copy rows to another workbook based on Listbox values returned
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-14-2009, 12:05 PM
  7. Replies: 1
    Last Post: 08-04-2006, 08:24 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