+ Reply to Thread
Results 1 to 5 of 5

Countif in two columns ?

  1. #1
    Registered User
    Join Date
    04-04-2010
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Countif in two columns ?

    Here's what I'm trying to do. I have a document where in one column there's a list of dates and in another column a list of results. I am looking to have a countif that would include both columns, for example :
    I want to know, (in 2005--first column), how many (g) there is in the other column. In the first column, it's not only 2005, there's a bunch of other years and there are a bunch of (g) in those other years. I'm trying to isolate the 2005 results and then, from those results, find how many (g) there are in the corresponding column. I do not want this as a filter, as I'm trying to do another sheet with statistics. That formula would be for the stats sheet, not just as a filter on the original sheet.

    I can provide more information if needed, I don't know if I'm made myself clear. It's clear for me, but you don't have the document in front of you

    Thanks for all your help !

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Countif in two columns ?

    A sample file will help people provide more specific info but given use of XL2007 you might want to check out the COUNTIFS function in XL Help (a Pivot Table may also be viable).

  3. #3
    Registered User
    Join Date
    04-04-2010
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Countif in two columns ?

    Quote Originally Posted by DonkeyOte View Post
    A sample file will help people provide more specific info but given use of XL2007 you might want to check out the COUNTIFS function in XL Help (a Pivot Table may also be viable).
    Thanks, I checked out the help but couldn't figure out a way to do what I wanna do.
    I'm attaching a very minimal sample of what I wanna do. You'll see the first sheet, then the stats sheet.

    I have a yearly total and then from that total I want to isolate how many G's and how many P's I have. I want to use the dates in the last column of the first sheet
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Countif in two columns ?

    Presumably you mean formulae for D2/D3 etc

    D2: =IF(C2,COUNTIFS(Feuil1!$D$5:$D$24000,"G*",Feuil1!$H$5:$H$24000,"*"&C1),0)
    Pending your locale config. you may need to change all commas to semi-colons in the above.

    D3: =C2-D2

    Formulae in D2:D3 can be copied and pasted into the other "blocks"

  5. #5
    Registered User
    Join Date
    04-04-2010
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Countif in two columns ?

    Quote Originally Posted by DonkeyOte View Post
    Presumably you mean formulae for D2/D3 etc

    D2: =IF(C2,COUNTIFS(Feuil1!$D$5:$D$24000,"G*",Feuil1!$H$5:$H$24000,"*"&C1),0)
    Pending your locale config. you may need to change all commas to semi-colons in the above.

    D3: =C2-D2

    Formulae in D2:D3 can be copied and pasted into the other "blocks"
    Thank you so much ! I'm always amazed at how quickly you guys come up with solutions haha
    Thanks again

+ 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