+ Reply to Thread
Results 1 to 5 of 5

VBA to filter data based on contents of a range

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    VBA to filter data based on contents of a range

    Hi,

    I'm trying to add a line of code to filter some data based on a date in the range cell C3.

    This is my code;

    Please Login or Register  to view this content.
    It doesn't seem to work, any ideas?

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA to filter data based on contents of a range

    What is the range of data that you want to filter?

  3. #3
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to filter data based on contents of a range

    the entire sheet if possible

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA to filter data based on contents of a range

    So you need something like
    cells.autofilter field:=3, criteria1:=Sheets("Start").Range("C3")

  5. #5
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to filter data based on contents of a range

    Thanks, the sheet i am filtering is a seperate sheet to the sheet containing the filter criteria so i need to add in

    Thisworkbook.sheets("Start").Range("C3")

+ 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. Automatically filter data in table based upon contents of one cell
    By m.g.williams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 01:08 PM
  2. Filter an External Data Query based on the contents of a specific cell
    By fayep1986 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2013, 08:36 AM
  3. Macro to Filter Table Based on Contents of a Cell which is Text
    By jgray in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2013, 11:57 PM
  4. Adjusting Range Contents Based on contents of Three other columns
    By VTHokie11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2012, 01:55 PM
  5. Reference Data Range based on cell contents
    By PCLIVE in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-27-2006, 11:10 AM

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