+ Reply to Thread
Results 1 to 4 of 4

checking a formula for counting between parameteres across multiple columns

  1. #1
    Registered User
    Join Date
    10-23-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    21

    Lightbulb checking a formula for counting between parameteres across multiple columns

    Hello,

    I am trying to get a database to count how many cells in a column are between a range (26-40) if a date in one cell (D5:D1300) is earlier than a date in another (K2) and if the value in another cell (E5:E1300) is "open". I have done the formula below but it does not seem to be adding things together the right way even though it returns a number:

    =SUMPRODUCT(--(Database!D5:D1300>=26),--(Database!D5:D1300<40) --(Database!E5:E1300="OPEN"))

    Any ideas?

    Anna

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: checking a formula for counting between parameteres across multiple columns

    Missing a comma:

    =SUMPRODUCT(--(Database!D5:D1300>=26),--(Database!D5:D1300<40),--(Database!E5:E1300="OPEN"))

    also you mention dates in D5:D1300. Is that correct because that is where you are checking the range of 26-40 too?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: checking a formula for counting between parameteres across multiple columns

    You say dates are in D, but then use that to compare to 26-40. Assuming the dates are after February 1900 (or 1904, depending on your settings), this formula will return 0.

  4. #4
    Registered User
    Join Date
    10-23-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: checking a formula for counting between parameteres across multiple columns

    Thats great! Thanks so much my problem is solved

+ 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