+ Reply to Thread
Results 1 to 2 of 2

VBA code to return all values in column that match a specified value

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    Cali
    MS-Off Ver
    Excel 2003
    Posts
    22

    VBA code to return all values in column that match a specified value

    Hi,

    I have values in sheet1 as below:

    TEST TEST1 TEST2 TEST3
    A AAA EE II
    B BBB FF TT
    C CCC GG BB
    D DDD HH EE
    A EEE II QQ


    I would like to return on sheet2 the rows that contain the value of "A" in column 1 (TEST column):

    TEST TEST1 TEST2
    A AAA EE
    A EEE II


    As you can see I dont want to return the whole row - ideally I would like to be able to choose the columns that I can copy over to sheet2. Thanks again for the help as always.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA code to return all values in column that match a specified value

    Please Login or Register  to view this content.
    you can change A and D to the columns you need as appropriate, if it is not a continuous range of columns then probably be best to split it onto separate lines of code and move each column on its own line, for example:
    Please Login or Register  to view this content.

+ 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