Results 1 to 10 of 10

Inserting countifs formula using vba.....having problem with date

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Inserting countifs formula using vba.....having problem with date

    I am trying to put the following formula into an excel sheet via vba.........

    COUNTIFS(Inputfile_InQQR!$B$2:$B$7774, 9/1/2011)
    but its giving me "0"

    if i change the formula to this.........it works

    COUNTIFS(Inputfile_InQQR!$B$2:$B$7774, "9/1/2011")

    problem i am having is in my vba code i have a variable

    current_month = "9/1/11"

    But no matter what i try i can seem to get the date into the right format for this formula to be inserted correctly........any ideas?
    Last edited by welchs101; 10-26-2011 at 07:18 PM.

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