+ Reply to Thread
Results 1 to 8 of 8

How to Copy a filter data with headers, excluding the headers?

  1. #1
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    How to Copy a filter data with headers, excluding the headers?

    Hello,

    I am writing macro, I have stopped.

    I have a data and I filtered some data specific, then I select the data with visible cells only, but it is selecting the headers, I would like not include headers.

    As this macro will be run often, the next visible row after the header can be 5 or can be 96, how I can do that? Some help much appreciated

    See my example so far, but this selection is including my header which is Row 1, maybe is another way. I don't want to include the header.


    ActiveSheet.Range("A:N").AutoFilter Field:=14, Criteria1:=Array("LOE", "LOE PSNME", "Mbrs", "Mbrs PSNME"), Operator:=xlFilterValues

    Range("A1").Select

    Range(Selection, Selection.End(xlDown)).Select

    Selection.SpecialCells(xlCellTypeVisible).Select

    Application.Run "modPaste.Copy"


    Thank you

    Eliana M

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: How to Copy a filter data with headers, excluding the headers?

    Hi, Eliana M ,

    please wrap your procedure with code-tags as requested in Forum Rule #3.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    Re: How to Copy a filter data with headers, excluding the headers?

    My Macro so far, please advise Thanks Holger

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: How to Copy a filter data with headers, excluding the headers?

    Hi Eliana,

    Please give a try with below code,

    HTML Code: 
    py
    Please Add Reputation, if you are happy with the help

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: How to Copy a filter data with headers, excluding the headers?

    Hi, Eliana M,

    please remember next time that you should edit the code from the opening post.

    How should I know what modPaste.Copy does?

    Always make sure that there is data to copy:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    Re: How to Copy a filter data with headers, excluding the headers?

    Hello Holher and PY!! wooow guys you are fantastic! Thanks for all your help.
    I was trying to look for the bottom that shows SOLVED and I couldn't find it.

    Your help was great!!

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: How to Copy a filter data with headers, excluding the headers?

    Hi,. Elena,

    from the FAQ:
    Mark Your Thread Solved
    To mark your thread solved do the following:
    New Method
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    Old Method
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save
    Ciao,
    Holger

  8. #8
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    Re: How to Copy a filter data with headers, excluding the headers?

    Thanks so much... now works... Great!!!

+ 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. Replies: 4
    Last Post: 02-08-2014, 02:31 PM
  2. [SOLVED] Dependent drop down lists- dynamic data range- excluding Headers
    By strud in forum Excel General
    Replies: 3
    Last Post: 05-28-2013, 04:10 AM
  3. Replies: 2
    Last Post: 05-09-2012, 01:30 PM
  4. Excluding one sheet from 'add headers'
    By Steven811 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2011, 10:35 AM
  5. Replies: 3
    Last Post: 09-30-2010, 12:30 PM

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