+ Reply to Thread
Results 1 to 12 of 12

Filtering Data and copying only filtered results

  1. #1
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Filtering Data and copying only filtered results

    I want to filter the data in one Workbook based on "Department Number" which produces about 10 lines which match the filter but these are on non-sequential lines within the data. I then want to copy only these 10 lines so that I can paste them into another Workbook.
    Can anyone help me please?

  2. #2
    Registered User
    Join Date
    01-19-2009
    Location
    UK
    MS-Off Ver
    2007
    Posts
    60

    Re: Filtering Data and copying only filtered results

    Highlight the cells, Ctrl + G, Visible Cells Only, OK.

    Now only the visible cells are selected, you can copy and paste to another workbook.

    Does this help?
    .
    - AKK9 -

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Filtering Data and copying only filtered results

    This would assume your criteria is in Column A.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Filtering Data and copying only filtered results

    Many thanks for your suggestion. I am trying to do this within a macro so I think the VB solution I have been given will be better. Thanks again

  5. #5
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Filtering Data and copying only filtered results

    Hi John

    Thanks for your help. It all works perfectly. I am a novice to VB so trying to teach myself in bits. The code you have given me is part of my answer and I will now work on the rest....... I might be back for some more help later tho

    Cheers

  6. #6
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Filtering Data and copying only filtered results

    Hi John, I said I might need more help.....
    If I want to filter the "Department Number" based on a vale in a specific cell on a different sheet in the workbook, how can I do this?

    Hope you can help

    Paul

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Filtering Data and copying only filtered results

    Not sure I understand but if I do try this:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Filtering Data and copying only filtered results

    Thanks John, you understand perfectly. I had a , before the Range rather than a . which is why it would not work!

    Any chance I can ask 2 questions?
    1. In your original code, the paste into the other workbook is perfectly located at cell A107. How does your code know where to paste it?
    2. If I wanted to wrap some code around it so that the macro loops round until the Value in the Filter Cell in the other Worksheet ="XXX" at which point it should finish. Is that something you could help me with? Current code shown below

    Again, many thanks

    Please Login or Register  to view this content.
    Last edited by bigfishprf; 03-05-2013 at 09:37 AM. Reason: Missed Tags!

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Filtering Data and copying only filtered results

    This line places the copied row to the next available row.

    Workbooks("Retail Timesheet MasterTemplate.xlsx").Sheets("Parameters").Range("A" & Rows.Count).End(3)(2)

    I'm very busy at the moment running my monthly reports and won't be able to comply with your other requirement. If no one else helps then later I'll take a look at it.

  10. #10
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Filtering Data and copying only filtered results

    I understand and am very appreciative.

    Thanks again

    Paul

  11. #11
    Registered User
    Join Date
    02-19-2013
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Filtering Data and copying only filtered results

    Thanks for your help. I managed to sort it all out in the end. It might not be pretty but it works.

    Cheers

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Filtering Data and copying only filtered results

    You're welcome. Glad you got it too work.

+ 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