+ Reply to Thread
Results 1 to 2 of 2

Counting entries w/ AND condition

  1. #1
    Registered User
    Join Date
    12-16-2004
    Posts
    15

    Counting entries w/ AND condition

    I have a list of data with 3 columns:

    Col A: Dates
    Col B: Prices
    Col C: Costs

    I want to create a table that counts the number of times that the price is more than a certain value and the cost is less than a certain other value in the same month (regardless of the year and day).

    For example:

    On 2/20/2004 the price was 100 and the cost was 50
    On 2/14/2005 the price was 75 and the cost was 75
    On 2/18/2005 the price was 50 and the cost was 40

    I want to count the number of times that the price is above 60 AND the cost is below 70, given that the month is February. I need a formula for the above data that will return 2. The formula must lookup the month from Col A to do the search.

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Shouldn't the formula return 1? If so, try...

    =SUMPRODUCT(--(MONTH(A2:A100)=2),--(B2:B100>60),--(C2:C100<70))

    Hope this helps!

+ 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