Results 1 to 3 of 3

Counting dates on a condition

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-07-2005
    Posts
    280

    Counting dates on a condition

    Hi everyone,

    I have a range of ten cells (B4:K4), some of these cells contains dates, and other cells contains text, what I want is counting number of cells that contain dates earlier than today's date.

    I actually tried the following code, but it returns zero value

    Sub MyTotOfExpIDs()
    Msgbox WorksheetFunction.CountIf([B4:K4], "< date")
    End Sub
    And when I tried the following formula, whcih shluld give as same result as VBA code, it returned an incorrect result:

    =COUNTIF(B4:K4,"<TODAY()")
    Can you please help me finding a solution for this problem:

    Thanks a lot,
    Attached Files Attached Files
    Last edited by LoveCandle; 06-02-2009 at 01:26 AM.

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