+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Auto select and copy rows containing a cell with a specific value

  1. #1
    Registered User
    Join Date
    05-18-2010
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    2

    Red face Auto select and copy rows containing a cell with a specific value

    Hi all.
    I have a sheet like a database filled with entries like bellow:
    Company.......Brand.......Info1.......Info2.......Info3
    Comp.1.......Brand A.......001.......252.......333
    Comp.2.......Brand B.......001.......252.......333
    Comp.2.......Brand B.......001.......252.......333
    Comp.1.......Brand A.......001.......252.......333

    My quest is to make on another sheet a drop-down list with the brands from the database (duplicate values removed), wich, when you select a brand, all rows containing that brand will be displayed or copied under the drop list.
    But, when i select another brand, all rows displayed from the previous query will be erased, and replaced with the new ones.

    Can anyone help me? I atached the file. Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: Auto select and copy rows containing a cell with a specific value

    This could be what you are looking for, Macro Enabled Workbook.
    Make the selection in the query Sheet, it will filter and paste the data you selected.

    This is modified code from this thread
    http://www.excelforum.com/excel-prog...worksheet.html
    Attached Files Attached Files

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Auto select and copy rows containing a cell with a specific value

    Was working on this when Dave posted - oh well, can't let effort go to waste.
    The attached automates Advanced Filter and population of the validation list and uses the worksheet activate and change events.

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

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: Auto select and copy rows containing a cell with a specific value

    Hi Palmetto,
    I get an error here
    Please Login or Register  to view this content.
    It tells me the Variable is not defined.

  5. #5
    Registered User
    Join Date
    05-18-2010
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Auto select and copy rows containing a cell with a specific value

    Nicely done davesexcel.

    THANKS A LOT!!

+ 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