+ Reply to Thread
Results 1 to 14 of 14

Copy filtered data

  1. #1
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    268

    Copy filtered data

    Hi there,

    Can someone please help me with a macro to copy filtered data?
    The filter is active from A10 to E86.
    The macro should only select & copy filtered data.

    Thanks,

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    880

    Re: Copy filtered data

    What row are your actual filters in? Row 9 or 10?
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    268

    Re: Copy filtered data

    The filter is on row 8

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    880

    Re: Copy filtered data

    Umm, strange as your data goes from row 10 unless you mean your first visible row is row 10. Anyway as an example the below will filter based on the blanks in column A of Sheet1 and copy to the first blank cell in column A of Sheet2.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    268

    Re: Copy filtered data

    Hi mate, the macro is not working. I have made the attached sample file.

    The macro does not require to paste in a separate sheet, the macro is just to copy filtered data.

    Are you able to help me that please?
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    880

    Re: Copy filtered data

    The macro posted works for doing what it stated it does.

    the macro is just to copy filtered data.
    Copy to where? I'm not psychic

  7. #7
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    268

    Re: Copy filtered data

    The paste part will be done manually outside Excel, so the macro just needs to select and copy, and leave it ready to paste to the Word file.

    Cheers

  8. #8
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    880

    Re: Copy filtered data

    With your sheet protection off (if you havn't set it to allow filtering and copying...I haven't checked)...
    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Post My 2 cents …


    Hi !

    A reminder : as Copy method works only with visible cells, SpecialCells is useless so no need neither On Error …

  10. #10
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    880

    Re: My 2 cents …

    On Error is there because if there were no visible cells it would error and so you always should have error handling with SpecialCells! I admire your faith that copy only works with visible cells.
    Last edited by WasWodge; 06-18-2019 at 10:55 PM.

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Arrow


    As I wrote no need On Error without useless Specialcells …

  12. #12
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    268

    Re: Copy filtered data

    Hi WasWodge,

    The only problem I am having is with the protect cells.
    How can I copy the cells and have the sheet protect as well?

    Thanks,

  13. #13
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    880
    We will have to differ on SpecialCells being useless, I will keep using it as copying not copying hidden cells doesn't always apply to manually hidden rows.

    I also use SpecialCells for finding blanks, constants and formulas btw.

    @ricdamiani, you have to allow filtering when you set the protection or turn it off at the start of the code and turn it back on at the end.
    Last edited by WasWodge; 06-19-2019 at 04:20 AM.

  14. #14
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Cool Try this ‼


    Quote Originally Posted by ricdamiani View Post
    The paste part will be done manually outside Excel, so the macro just needs to select and copy, and leave it ready to paste to the Word file.
    Cheers
    Select is useless, just copy the range as for example according to your post #5 attachment

    this well working single codeline on my side : Sheet2.[A9:E90].Copy …

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy filtered data into filtered range in a separate sheet
    By vikas.trades25 in forum Excel General
    Replies: 1
    Last Post: 02-07-2019, 04:04 AM
  2. [SOLVED] Copy the filtered dates, do Formatting and paste it back to filtered column
    By Rajkumar_h in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2017, 10:53 AM
  3. [SOLVED] Copy Filtered Data
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2017, 05:15 PM
  4. How to copy filtered data into filtered data?
    By The_Snook in forum Excel General
    Replies: 1
    Last Post: 08-19-2013, 10:32 AM
  5. [SOLVED] Copy data into filtered row
    By arlu1201 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2012, 03:23 AM
  6. Copy filtered data to a new row
    By pajson in forum Excel General
    Replies: 1
    Last Post: 05-27-2010, 10:13 AM
  7. [SOLVED] Copy filtered data
    By Hans Knudsen in forum Excel General
    Replies: 3
    Last Post: 11-25-2005, 09:35 AM

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