+ Reply to Thread
Results 1 to 7 of 7

Headcount - Countif with Vlookup?

  1. #1
    Registered User
    Join Date
    03-22-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    2

    Headcount - Countif with Vlookup?

    Hi Guys,

    I'm quite new here and I can see that there are a lot of excel-experts around and I thought I would give it a shot.


    My issue is that I have a large large headcount file where I need to count (summon) a specific "type" IF there is a value in the month of my choice.

    Etc; Headcount TYPE 1, how many headcounts of TYPE 1 do I got in JAN? The value in JAN column doesnt matter, however if its blank it should not count.

    I post an example and hopefully you understand what I mean.

    Thank you guys
    Attached Files Attached Files

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

    Re: Headcount - Countif with Vlookup?

    Do you mean, in D11:

    =SUMIF($A$2:$A$7,$A11,D$2:D$7)

    copied down and across....?
    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 bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Headcount - Countif with Vlookup?

    If NBVC doesnot help, try:
    Please Login or Register  to view this content.
    Quang PT

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

    Re: Headcount - Countif with Vlookup?

    I always try to help!

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Headcount - Countif with Vlookup?

    I mean if NBVC's formula does not meet the query
    I think that he want to count occurances except blank !

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Headcount - Countif with Vlookup?

    I mean if NBVC's formula does not meet the query
    I think that he want to count occurances except blank !

  7. #7
    Registered User
    Join Date
    03-22-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Headcount - Countif with Vlookup?

    Maybe my questions is a little vague and I apologize for that. I'll try again:

    You can see that I have Headcount TYPE. Below that I have type 1 to 7. For each type we have month jan to dec.

    I want for example vlookup TYPE 3. By looking at the example I attached we can see that during jan, feb and march there is no data (blanks) that means also that in the row for type 3 I should not have any count for jan-march. However from apr-dec I should get an count of 1 for each month as you can see there is only one type 3 in the list with the "data". The original file I have is HUUUGE so this is just one tiny percent of what I have stored.

    In the file I have today I was able to do the same thing I'm showing you guys but with a SUMIF. With the sumif I'm able to search for a criteria (type 1-7) within a range to return the sum of the criteria I have inserted. However I have not been able to do a countif with this as the sum is just a total amount but I would also like to know how many "headcounts" I got within the different types.

    I tried your suggestions and it did not seem to work like I want it to look like.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Headcount - Countif with Vlookup?

    May be follow my solution in #3, with slight correction:
    =COUNTIFS($A$2:$A$7,$A11,D$2:D$7,">"&1/10^10)
    Copy down and across

+ 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