+ Reply to Thread
Results 1 to 4 of 4

count with two conditions

  1. #1
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    count with two conditions

    Hi,

    The requirement is: i have a list of date values in column A to C with header say, grade A, B and C respectively. I need to count if :
    1. dates are within a range say, jan 01 08 to jan 31 08
    2. column header is, in this case, "Grade A"

    I hope I am clear.

    thanks in advance

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

    =sumproduct((A2:C100>date1)*(A2:C100<date2)*(A1:C1="Grade A"))

    where date1 and date2 are the start and end dates and can be references to cells containing those dates.
    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-28-2007
    Posts
    45

    sum product

    Hi It worked ! thanks! in case if I require one more condition;

    for ex. i have grade A to Grade E from A1 to E1 and some dates from A2 to E2. From the specified range of dates, it should count only if the header is Grade B or C, ignoring Grade A, D and E. I tried with this formula and seems not working... sure that I am very near..

    =SUMPRODUCT((A2:E2>J2)*(A2:E2<J3)*(A1:E1 ="Grade B")*(A1:E1 ="Grade C")

    where J2 and J3 are the start date and end date respectively.

    Can anybody help...Thanks.

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

    Please Login or Register  to view this content.

+ 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