Closed Thread
Results 1 to 8 of 8

Countif on a Specific Column Header versus a specific Column

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    32

    Countif on a Specific Column Header versus a specific Column

    Hey,

    I am trying to complete a countif of a certain column based on the header of a column versus just doing a countif on the range of a specific column. Please see the attached file for guidance. Thanks in advance for the assistance!
    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: Countif on a Specific Column Header versus a specific Column

    You can use COUNTIFS...

    e.g

    in D2:

    =COUNTIFS($A$2:$A$6,A2,$B$2:$B$6,205)

    copied down
    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
    10-26-2010
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    32

    Re: Countif on a Specific Column Header versus a specific Column

    Thanks. I am actually trying to get the count of 205 in column labeled StatusCode. Therefore, regardless of which column StatusCode (currently column B) shows up the results will show 3 in 205 and 2 in 225. I am not sure how to isolate the StatusCode column regardless of where it can show up in the sheet versus normally assigning just a column as the range

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

    Re: Countif on a Specific Column Header versus a specific Column

    Do you mean then, something like:"

    =COUNTIF(INDEX($A$1:$S$6,0,MATCH("StatusCode",$A$1:$S$1,0)),205)

    where A1:S6 is the entire range, and the Match finds what column the StatusCode header is in and then counts the 205's in that column.

  5. #5
    Registered User
    Join Date
    10-26-2010
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    32

    Re: Countif on a Specific Column Header versus a specific Column

    Perfect. Thanks!

  6. #6
    Registered User
    Join Date
    05-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Countif on a Specific Column Header versus a specific Column

    I found this formula to work =COUNTIF(B1:B6,205) that way it will only return the accounts if its associated with 205. Or are you trying to return the name also that associated with 205? Hope that helps.

  7. #7
    Registered User
    Join Date
    07-14-2020
    Location
    Bangalore
    MS-Off Ver
    2016
    Posts
    1

    Re: Countif on a Specific Column Header versus a specific Column

    Hi Buddy thank you so much, what I need to add here is multiple condition like Trainers name = Ashish and program name should be Induction. Please help

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Countif on a Specific Column Header versus a specific Column

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed 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