+ Reply to Thread
Results 1 to 7 of 7

How to copy specific rows of filtered data using VB

  1. #1
    Registered User
    Join Date
    04-29-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    17

    How to copy specific rows of filtered data using VB

    Hi,

    I filtered a column using specific criteria, I dont want to copy the whole filtered data, but I want to copy only 2nd and 3rd row of the filtered data to another workbook. Can you please help on that?

    I have attached my worksheet with VB code. I filtered column 4 with FilteredBucket1 data, I want to copy column 2 and 3 to anithere work book.




    Thanks in Advance,
    Menaka B
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to copy specific rows of filtered data using VB

    Do you want to copy 2nd and 3rd row or column? One sentence states column, the other row.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    04-29-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to copy specific rows of filtered data using VB

    sorry its columns oly...2nd and 3rd column

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to copy specific rows of filtered data using VB

    Try this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-29-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to copy specific rows of filtered data using VB

    Hi,

    Thanks for the reply.

    It is not copied to the range because in copyFrom.Copy .Range("A" & .Rows.Count).End(xlUp).Offset(1, 0) , I dont have any data in the column. Please take the excel which I attached previously

    Can you please check and say why below statement is not returning correct count, if it works I think the code will work fine.

    Please Login or Register  to view this content.
    Thanks in Advance,
    Menaka
    Last edited by arlu1201; 05-01-2013 at 01:44 PM.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to copy specific rows of filtered data using VB

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to copy specific rows of filtered data using VB

    I used the excel which you gave me and in that i found that the data was being copied to the following ranges ( examples)

    A2:B5
    C6:D9
    E10:F13, etc....

+ 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