+ Reply to Thread
Results 1 to 4 of 4

Auto Filter Top Line copied to A400

Hybrid View

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    Essex
    MS-Off Ver
    Excel 2007
    Posts
    17

    Auto Filter Top Line copied to A400

    HI,

    I do a lot of auto filtering and need my clients name that is first in the filter to be copied into cell A400.

    but as each filter gives me a different First row I dont know how to do this?

    for example if i filter june its row 200 thats the first on the sheet but January would be row 2, but i need it to input into A400 the data In A thats first once the filter has been done?

    any ideas?

  2. #2
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Auto Filter Top Line copied to A400

    Hello BigTandthepc,

    The following code should work, regardless of which cell is first in your filtered results. Courtesy http://www.ozgrid.com/forum/showthread.php?t=23611, and tweaked for you:

    Sub MoveResult()
        If ActiveSheet.FilterMode = True Then
             'Select cell in 2nd row first column
            ActiveSheet.UsedRange.SpecialCells _
            (xlCellTypeVisible).Areas(2).Columns(1).Cells(1, 1).Select
            Selection.Copy
            Range("A400").PasteSpecial
        End If
    End Sub

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    Essex
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Auto Filter Top Line copied to A400

    Hi,

    Thank you so much, its exactly what I needed thank you.


  4. #4
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Auto Filter Top Line copied to A400

    Awesome! You are very welcome. Happy coding....

+ 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