Results 1 to 2 of 2

Thread: Excel VB - Copy and paste in autofilter?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2009
    Posts
    2

    Excel VB - Copy and paste in autofilter?

    Hi there,

    I'm trying make a macro so that I can take a cell value and paste it in the autofilter custom value box.

    At the moment the code is:
    Code:
    Sub Macro7()
    '
    ' Macro7 Macro
    ' Macro recorded 15/04/2009 by 43462569
    '
    
    '
        Range("C11:C12").Select
        Selection.Copy
        Sheets("Sheet2").Select
        Selection.AutoFilter Field:=2, Criteria1:="=0123", Operator:=xlAnd
    End Sub
    As you can see the value that is coming from C11:12 is 0123, now if i change this to anything else e.g. 545, the Code above will still take 0123.

    Is there anyway to take this new value (any value typed) and copy it into the autofilter criteria1:= field?

    ----- On the flip side ---

    What im trying to do is:

    Create a lookup and replace, at the moment my excel sheet using =Lookup formulas, but I need to edit the data that is collected and then replace it.
    What is the best way of doing this?

    Thanks for your help

  2. #2

    Thread Starter
    New Member
    Join Date
    Apr 2009
    Posts
    2

    Re: Excel VB - Copy and paste in autofilter?

    I take it this isn't a simple process to do?
    Any other methods to do the same things?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width