+ Reply to Thread
Results 1 to 3 of 3

help needed linking to a cell to obtain date

  1. #1
    Registered User
    Join Date
    08-29-2008
    Location
    Perth
    Posts
    8

    help needed linking to a cell to obtain date

    This is my code...

    ActiveSheet.Range("$A$5:$P$9998").AutoFilter Field:=12, Criteria1:= _
    ">=7/01/2008", Operator:=xlAnd, Criteria2:="<=09/30/2008"

    Now my dilemma is i have 2 cells, (Data!b6 and Data!b7), containing dates.

    I want Criteria1 to to be >=Data!b6 and I want Criteria2 to be <=Data!b7. It seems simple enough but I cannot get it working.

    The other problem is the cells containing dates are coded as dd/mm/yyyy (being in Australia), while VBA is reading the dates mm/dd/yyyy.

    Does anyone have any idea on how I can get this working?

    Thanks.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Please read the Forum rules then edit your post to add Code tags
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-29-2008
    Location
    Perth
    Posts
    8
    Sorry Roy,

    Here is my code with tags ( couldn't see an edit button for my above post)...

    Please Login or Register  to view this content.
    Anyone have any ideas? Much appreciated. CHeers.

+ 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. macro: changing cell color based on date in cell
    By mikewg in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-27-2011, 02:17 AM
  2. inserting a date into a cell
    By cmf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2008, 08:47 AM
  3. auto date cell when adjacent cell has data entered?
    By kalisun in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-01-2007, 12:49 PM
  4. Date stamping a cell
    By terryainsley in forum Excel General
    Replies: 11
    Last Post: 10-12-2007, 12:38 PM
  5. Date "condition" to bring up a value in a specific cell
    By sunking in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2007, 05:52 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