+ Reply to Thread
Results 1 to 5 of 5

Row count using more than a single criterion?

  1. #1
    Registered User
    Join Date
    03-28-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Question Row count using more than a single criterion?

    Hello -

    I have a spreadsheet (2007) and need to mark the first instance of a "1" occurring in one column, but only if the "1" is within a given range of numbers in another column.

    I attached an example spreadsheet. In column D (highlighted yellow), I did what I need manually. Is there a formula that can be placed in D to do this automatically?

    Example_MultCriteria.xls

    Basically, each Person (column A) saw 10 Videos (column B) and they recognized something (a "Hit", column C). I want to mark the first point they recognized something in each video. Each video might have multiple Hits, but I only want to mark/flag the first Hit.

    Thoughts?

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

    Re: Row count using more than a single criterion?

    Try:

    =IF(C2="","",--(COUNTIFS(A$2:A2,A2,B$2:B2,B2,C$2:C2,1)=1))

    then format the results as Number, with Custom Type: 0;-0;;@
    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 daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Row count using more than a single criterion?

    Try this formula in D2 copied down

    =IF(AND(COUNTIFS(A$2:A2,A2,B$2:B2,B2,C$2:C2,1)=1,C2=1),1,"")
    Audere est facere

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Row count using more than a single criterion?

    Try this...

    Entered in D2 and copied down:

    =IF(C2="","",IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2,C$2:C2,1)=1,1,""))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    03-28-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Row count using more than a single criterion?

    Those solutions worked, thank you both!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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