Results 1 to 5 of 5

Macro to copy text into autofilter criteria

Threaded View

  1. #1
    Registered User
    Join Date
    03-06-2012
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2010
    Posts
    48

    Macro to copy text into autofilter criteria

    Hi everyone, I'm trying to figure out how I can set up the following.

    The end desire is to have something where my end user can type in the # they want details about and than click the shiny red button and BAM the macro sends them to the details page already filtered to the number they typed in before. When I recorded the macro however the paste into the criteria search box keeps recording as the text not the actual paste of the copied text from sheet 1. the macro comes up as follows.

    Range("J7").Select
    Selection.Copy
    Sheets("Sheet2").Select
    ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=1, Criteria1:= _
    "47412"

    So essentially I'm just hoping to change the "47412" to .Paste (tried but just shot back an error to me.)

    Thanks in advance for any help.

    ~James H. Cameron
    Attached Files Attached Files
    Last edited by CDNcameron; 03-07-2012 at 04:57 PM.

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