+ Reply to Thread
Results 1 to 4 of 4

COUNTIF for date and amount

  1. #1
    Registered User
    Join Date
    11-10-2009
    Location
    Watkins Glen, NY
    MS-Off Ver
    Excel 2007/2003
    Posts
    48

    COUNTIF for date and amount

    Greetings,

    I have a spreadsheet that looks like below

    A B
    1/2/08 $5.50
    5/10/08 $15.00
    11/5/08 $25.00
    10/1/07 $18.50
    12/1/08 $7.50

    I would like populate column C with counts (how many times):

    C1 : If date is between 1/1/08 and 12/31/08 and between 1 and 9.99
    C2: If date is between 1/1/08 and 12/31/08 and between 10 and 19.99
    C3: If date is between 1/1/08 and 12/31/08 and between 20 and 49.99


    The results would be

    C
    1 2
    2 1
    3 1

    Thanks for any help!
    -B

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

    Re: COUNTIF for date and amount

    Fro C1:

    =Sumproduct(--(A1:A3>=Date(2008,1,1)),--(A1:A3<=Date(2008,12,31)),--(B1:B3>=1),--(B1:B3<=9.99))

    adjust as appropriate for other 2 cells.

    Note you can also enter criteria in cells and point to them so that you can change at will...
    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
    Registered User
    Join Date
    11-10-2009
    Location
    Watkins Glen, NY
    MS-Off Ver
    Excel 2007/2003
    Posts
    48

    Smile Re: COUNTIF for date and amount

    Quote Originally Posted by nbvc View Post
    fro c1:

    =sumproduct(--(a1:a3>=date(2008,1,1)),--(a1:a3<=date(2008,12,31)),--(b1:b3>=1),--(b1:b3<=9.99))

    adjust as appropriate for other 2 cells.

    Note you can also enter criteria in cells and point to them so that you can change at will...

    you rule! You rule!

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

    Re: COUNTIF for date and amount

    Please remember to mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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