+ Reply to Thread
Results 1 to 17 of 17

Extract rows of data based on keyword

  1. #1
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136

    Question Extract rows of data based on keyword

    Greetings,
    I notice that this is a similar problem to sooshi below, but hopefully someone can help as i'm getting very frustrated.
    Attached is a spreadsheet describing my problem in greater detail, but essentially i want to extract rows of data depending on quoter name. I'm fairly competent with excel formulae, but cannot get the desired results. I know nothing of VBA other than copying and pasting other's VBA projects in and fiddling with them until something good happens!!
    I wish to extract the data and deposit into another worksheet or better still another workbook entirely but without any breaks in the rows of data.
    Havent had much luck with advanced filter either.
    The attachment should hopefully show what i want to achieve better than my ramblings. This is my first ever post on one of these type things, so i have my fingers crossed
    Attached Files Attached Files
    Last edited by TheRetroChief; 10-06-2008 at 04:29 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Maybe the code in this could help. It will need changing for your use

    http://www.excelforum.com/excel-prog...-in-value.html
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Post

    Below I have tried to explain the steps of a macro as clearly as possible to help you understand what is happening so that you can modify it as required.
    I have also re-atached your spreadsheet with the macro loaded into it.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    For a coded solution
    Please Login or Register  to view this content.
    For a formula solution see attached file sheet 3 array formula
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    Thanks chaps,
    I'm working through your solutions. I'm getting somewhere with Phil's solution.
    But i figure i may as well show you a more detailed example. My actual workbook will be similar to that attached. Unfortunately i can't put all the data in that i will need it to use - confidentiality and all that jazz.
    I will need whatever solution i use to extract the data depending on the quoter and deposit in the corresponding sheet. If you can put a working example in here that i can bastardise and copy into the actual sheet, that would be absolutely chuffing amazing!!!

  6. #6
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136

    smoothly done...

    Helps if i attach of course....bloody newbie forum users eh???
    Attached Files Attached Files

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This works in the first table of data. You will need to change it for the other table if required
    Attached Files Attached Files

  8. #8
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    Doesn't seem to work chief on my machine I'm afraid....i only get one entry for Andy H, duplicated across all the sheets!! FYI the second table is not relevent to this exercise, that will get filled in by different means.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I've adjusted the Field so this now works
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    Ah yes, that does the trick...the only thing now is that i have the first line (the Andy H entry) as the top line on each of the sheets, almost like a column heading. I can live with it, but would rather it wasn't there!!
    This is top drawer by the way!!!

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Hopefully sorted now
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    Spot on my man!!
    I shall now attempt to reverse engineer it and work out what the hell is going on!!
    Many thanks for your and all others' help!!
    Ali Mac (TheRetroChief)

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    post back with specific questiuons & I'll try to explain.

  14. #14
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136

    Just one last thing....

    Is there any way to automate it so that you don't have to run the macro each time you put a new row of data into the first sheet??? It will be added to on a regular basis and used by multiple users who will undoubtedly forget to run the macro!!

    Many thanks,
    Ali Mac

  15. #15
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You could use the worksheet change evnt, but this would slow down user input. Maybe you could use the workbook before close event so that it runs on closing the workbook.

  16. #16
    Registered User
    Join Date
    11-04-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Extract rows of data based on keyword

    Hello- New post, I am a young winger trying to replicate this method for a bank balance statement copy and pasted into an excel spreadsheet.

    Only difference is that I am trying to isolate all the rows pertaining to ASDA purchases all contained in the C column of the sheet.

    I tried to copy the 2 codes above exchanging the entry for "Andy H" for keyword "Asda", and changed A1 "quote" to C1 "description"

    Am I just a complete novice or am I going along the right lines?? I am trying to figure out my student expenditure.

    John Paul, UK

  17. #17
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extract rows of data based on keyword

    John Paul,
    Welcome to the forum!
    Unfortunately, this does not copy with forum's rule.
    You need to start your own thread. Please read forum's rules.

+ 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. Macro or Formula to extract data
    By incognito in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2007, 11:28 PM
  2. sort a set of data based on another set of data
    By sry_deep in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-23-2007, 09:50 AM
  3. Replies: 5
    Last Post: 09-17-2007, 11:16 AM
  4. Select rows with data
    By vandanavai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-31-2006, 02:59 AM
  5. Need to extract random data using set criteria...
    By dance621 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2006, 06:03 AM

Tags for this Thread

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