+ Reply to Thread
Results 1 to 3 of 3

multiple countif function with text

  1. #1
    Registered User
    Join Date
    04-03-2008
    Posts
    3

    multiple countif function with text

    Hi all this is my first post so please be gentle.

    What i am trying to do is to create a register in excel that counts the number of times a person has an incident at work which i have done. The problem that I have is that I want it to not only count the total number of incident but to count the incidents only within the last year and when they are at fault.

    So as an example my spreadsheet currently looks like this

    A B C
    name date at fault
    1 stu 1/2/08 y
    2 stu 1/2/07 Y
    3 stu 1/1/08 N


    What i need it to do is say that person stu has 1 incident to date as one is not at fault and the other is over 1 year ago. Any ideas would be great..thanks

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

    =Sumproduct(--(A2:A100="stu"),--(Year(B2:B100)=2008),--(C2:C100="y"))

    or

    if you mean with 365 days of today...

    =Sumproduct(--(A2:A100="stu"),--(Today()-B2:B100<=365),--(C2:C100="y"))


    all variables can be replaced with cell references containing those variables.

    adjust ranges to suit.
    Last edited by NBVC; 04-03-2008 at 09:33 AM.
    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
    04-03-2008
    Posts
    3
    worked perfectly mate thanks very much..just couldnt get my head round it.


    I ended up using this formula and changed it to my needs..can you please explain how excel reads it so I know in future


    =Sumproduct(--(A2:A100="stu"),--(Today()-B2:B100<=365),--(C2:C100="y"))
    Last edited by stuuk2008; 04-03-2008 at 04:10 PM.

+ 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