+ Reply to Thread
Results 1 to 2 of 2

filter error

Hybrid View

  1. #1
    x taol
    Guest

    filter error



    date filter error
    the current sheet is following(format "yyyy-mm")
    a column
    mydt
    2000-04
    2000-04
    2000-04
    2000-05
    2000-05
    2000-06
    but the real value(value in formula box)
    a column
    mydt
    2000-04-01
    2000-04-01
    2000-04-01
    2000-05-01
    2000-05-01
    2000-06-01

    i want to filter 2000-05 only using macro.
    the folowing code .... not work
    sub ex()
    set rng=range("a1:a7")
    rng.autofilter
    rng.autofilter 1, format(cdate("2000-05-01"),"yyyy-mm")
    end sub

    *** Sent via Developersdex http://www.developersdex.com ***

  2. #2
    Karthik Bhat - Bangalore
    Guest

    Re: filter error

    Hi

    Use this code

    sub ex()
    set rng=range("a1:a7")
    rng.autofilter
    rng.AutoFilter 1, Criteria1:="2000-05"
    end sub

    Thanks
    Karthik Bhat


+ 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