+ Reply to Thread
Results 1 to 6 of 6

Extract Rows based on Cell Value

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Extract Rows based on Cell Value

    Hi

    I'm wanting to extract rows from Data sheet into Report sheet based on criteria in cell B1 of Report sheet and column E of Data sheet.

    eg. if Report sheet cell B1 = MLO I want to copy and paste all the Rows within Data sheet where column E contains MLO into the Report sheet (starting in cell C2)

    Thanks
    Andrew
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Extract Rows based on Cell Value

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-23-2012
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract Rows based on Cell Value

    Thanks Patel

  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: Extract Rows based on Cell Value

    Hello AndrewS6,

    Welcome to the Forum!

    I expanded what you asked for. Since B1's content is controlled by a validation drop down, the macro will fill the range starting at C2 with the row data. The macro is called automatically whenever B1 changes. This is accomplished by the Worksheet Change event for the Report worksheet. The macros are listed below. The attached workbook contains these changes.

    Extract Rows Macro
    Please Login or Register  to view this content.

    Report Worksheet Change Event MAcro
    Please Login or Register  to view this content.
    Attached Files Attached Files
    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!)

  5. #5
    Registered User
    Join Date
    07-23-2012
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract Rows based on Cell Value

    Thanks Leith. Just what I am after

  6. #6
    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: Extract Rows based on Cell Value

    Hello AndrewS6,

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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