+ Reply to Thread
Results 1 to 22 of 22

List Extracted Rows Of Specified Data From Another Workbook

  1. #1
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Question List Extracted Rows Of Specified Data From Another Workbook

    Hello,

    I have two workbooks. One is called the Extraction Sample, which is attached, and the second is the Sorted Results workbook.

    The Extraction Sample workbook contains a master sheet with data in a chart, which gets updated periodically. The Sorted Results workbook contains a list of specific extracted results from the Extraction Sample workbook.

    The formula I am trying to create for the Sorted Results workbook needs to do two things:

    1. Extract only the rows from the master sheet in the Extraction Sample workbook which contain the word 'Thing' in column D.
    2. List the extracted rows on the Sorted Results workbook in numerical order using the data from Column B.

    What would be the best way for me to accomplish this? Thanks in advance for your wisdom.
    Attached Files Attached Files
    There is so much good in the worst of us,
    And so much bad in the best of us,
    That it hardly behooves any of us
    To talk about the rest of us.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    One approach is to Sort your Data on Column B then do a Custom Text Filter on Column D (Criteria1:="=*Thing*"). Copy the resulting Visible Cells to Sorted Results.

    Another approach is to do the Custom Filter on Column D then copy the resulting Visible Cells to another Worksheet. Sort this "another" Worksheet on Column B and Copy the results to Sorted Results.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Thank you jaslake, I wasn't sure how to code that, but mehmetcik got close, thank you. This works, but I need a few changes - I'm willing to use the button within the same workbook, but I'd like the button to be on the same sheet as the results. How do I change the code in order to do that? The sheet name for both the button and the list of results can be Sheet2. Thanks!

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    Using mehmetcik's Code, it'll probably be something like this
    Please Login or Register  to view this content.
    This Code assumes Sheet Sorted Results exists and the Code is running from it.

  6. #6
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Thank you jasklake, that works swell with my sample workbook, but now when I'm trying to modify it to work with my actual workbook, I can't seem to shake a 'Subscript out of range' error whenever I hit the button. Nothing in the code is selected as the problematic part either - any idea what I'm doing wrong?

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    I've not experienced this
    Nothing in the code is selected as the problematic part
    I'd suggest stepping through the Code (F8) to see where the Code faults...keep me posted...

    Edit...the Code assumes that Sheet Sorted Results exists in the SAME Workbook. If it's in a DIFFERENT Workbook the Code will need modified
    I have two workbooks. One is called the Extraction Sample, which is attached, and the second is the Sorted Results workbook
    Last edited by jaslake; 10-25-2013 at 04:53 PM.

  8. #8
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Thank you jaslake! I was able to fix that issue - I was forgetting to change the name of Sheet1 to the actual name I needed. Silly mistake.

    I apologize for my late responses, I'm only in the office a few times a week. Thank you so much for sticking with me here.

    It's working quite nicely now, but I have another question - could you take a look at the attached sample workbook and see if the following can be done?

    1. Display the results as shown on the Desired Thread Gauge List sheet instead of the way they are currently shown on the Current Thread Gauge List.

    2. After clicking the button and the formula runs, have cell A1 selected for clarity purposes instead of all the cells that were just copied over.

    Do let me know if you think this can be done, and thanks again for your help! It's greatly appreciated.
    Attached Files Attached Files

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    See if this Code works for you
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    jaslake, I think that will almost do the trick for me, thank you so much! I did run into one little problem with the code though - for some reason I'm getting the first row of data on the Current List showing up on the Current Thread Gauge List all the time, even when it isn't a Thread Gauge.

    And after hitting the button, all the updated cells remain selected - is there some way to select a different cell, for example A1, just to create one less step for the operator?

    I've attached the workbook as we've got it so far. Would you be able to take one more look at it? And thank you so much again.
    Attached Files Attached Files

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    Try the Code in the attached...

    PS: I missed this
    And after hitting the button, all the updated cells remain selected - is there some way to select a different cell, for example A1, just to create one less step for the operator?
    Add the line of Code as indicated
    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Thank you yet again, now we're very close. I am having some final issues with the sorting though.

    The fist gauge listed is always at the top no matter what the description is. Take a look at the attached workbook to see what I mean - 4-40 should be before .5-13, but then again, neither should .5-13 come before 10-32. The sorting I am trying to achieve is shown on the Desired Sorting sheet.

    Do you think there's a way to fix that yet? Thanks again, by the way!
    Attached Files Attached Files

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    Haven't forgotten about you...have the Sort surrounded...not quite there...get back to you...

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    This Code in the attached appears to do as you require for the Custom Sort Routine...let me know of issues...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  15. #15
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hello again! So sorry for the delay, life has been crazy and I haven't been in the office for quite some time.

    That code looks much more like it, but I am having quite a bit of trouble whenever I click the 'Update List' button, and then try to save the workbook. I get a lovely 'Microsoft Excel has stopped working' message and the whole thing shuts down on me. Would you have any idea why? Thanks again!

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Hi swordswinger710

    Is this happening on the File attached to Post #14 or another File? I don't have an issue on my platform with the Post #14 File.
    If another File, attach the Offending File and I'll look at it.

  17. #17
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    The problem seems to be with the code from Post 14. Even if I copy the code and paste it into another Excel workbook, upon clicking the button, I can no longer save without crashing the workbook. I am running Excel 2010 on Windows 7, but I'm not sure if that makes a difference?

  18. #18
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    Does the File in Post #14 exhibit the same issue?

  19. #19
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    I just ran the Code in Excel 2010 with no issue (using XP)...

    Correction...upon SAVING the File in Excel 2010...Excel crashed...

  20. #20
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    At the Bottom of the Sort_Me routine is this line of Code
    Please Login or Register  to view this content.
    Comment it out then run the Code...save the File...let me know.

  21. #21
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: List Extracted Rows Of Specified Data From Another Workbook

    I finally got the chance to finish this up, and it works!

    Thank you very much again!

  22. #22
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: List Extracted Rows Of Specified Data From Another Workbook

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. Specific rows in several worbooks need to be extracted to a new workbook
    By patchpollito in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-07-2013, 04:21 PM
  2. [SOLVED] Using VBA how do you close a user defind workbook after you have extracted data
    By klonbeck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2012, 06:00 PM
  3. [SOLVED] Extracted names from list if value greater than 2
    By MajorT in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-31-2012, 10:05 PM
  4. Cannot view personal workbook on doc extracted from database
    By fabrecass in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-04-2011, 09:43 AM
  5. New sheet name extracted from various cells, sorting sheets, saving new workbook
    By Luccin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-10-2010, 05:51 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