+ Reply to Thread
Results 1 to 2 of 2

autofilter criteria linked to cell reference

Hybrid View

  1. #1
    Registered User
    Join Date
    12-15-2006
    Posts
    18

    autofilter criteria linked to cell reference

    Hello - hoping some one can help me!

    Im recording a macro that goes into another workbook applys an autofilter and copies and pastes the results into the original workbook.

    Windows("FTE Database.xls").Activate
    Selection.AutoFilter Field:=12, Criteria1:="Bob Jones"
    Range("A891:C1197").Select
    Selection.Copy
    Windows("Collector").Activate
    Range("B7").Select
    ActiveSheet.Paste
    Range("B7:D26").Select
    Application.CutCopyMode = False

    Is there anyway i can make the criteria link to Text in a Cell? I.E. instead of manually selecting Bob Jones, i want to macro to autofilter to the text in cell "T5" in the "Collector" workbook

    Thanks,

  2. #2
    Registered User
    Join Date
    12-15-2006
    Posts
    18
    Found it,

    Just for anybody else having similar troubles:

    Selection.AutoFilter Field:=13, Criteria1:=Sheets("Sheet1").[T5].Value
    Last edited by mrmiddleman; 08-15-2007 at 06:24 AM.

+ 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