+ Reply to Thread
Results 1 to 9 of 9

countif based on another column

  1. #1
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    countif based on another column

    How do I count numbers in one column based on values in another column. Count column A, if column B= x, for example.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: countif based on another column

    =sumproduct(isnumber((B1:B100="X")*(A1:A100))*1)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    Re: countif based on another column

    I tried this but it didn't work =COUNTIFS(E1:E74478,F1:F74480=HVAC)

    E is the column I want to count based on criteria in column F.

  4. #4
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    Re: countif based on another column

    Hi Hemesh. I tried that but it didn't work. Maybe I'm not applying it right.

  5. #5
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: countif based on another column

    Quote Originally Posted by stephme55 View Post
    I tried this but it didn't work =COUNTIFS(E1:E74478,F1:F74480=HVAC)

    E is the column I want to count based on criteria in column F.
    you could give a try to

    =SUMPRODUCT(--(((F1:F74478="HVAC")*(E1:E74478))>0))
    Last edited by hemesh; 02-10-2016 at 02:11 PM. Reason: updated formula

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: countif based on another column

    What does the name HVAC refer to? Or, is this really supposed to be the text string "HVAC"?

    Can you explain what the difference is in your actual data between "how many entries in column F are "HVAC?" and how column E actually fits into your desired calculation? It seems to me that, unless there is a second condition based on column E, then a conditional count of column F is adequate. If you need to place a condition on column E, it should be as simple as using the COUNTIFS() function =COUNTIFS(F1:F74480,"HVAC",E1:E74480,condition for column E).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    Re: countif based on another column

    Hi Hemesh. I tried that but it didn't work. Maybe I'm not applying it right.

  8. #8
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    Re: countif based on another column

    Actually, I confused myself haha. Sorry I'm going to close this one and reopen a different thread because the question is slightly different. Thanks.

  9. #9
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: countif based on another column

    what did you try, I updated formula, Can you please upload a sample book to know whats actually there

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. countif value in column based on date match in header
    By lucasreece in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-15-2015, 02:36 AM
  2. How to countif a specific column based on a cell text value.
    By JamesBlack90 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2015, 07:46 AM
  3. How can I use Countif based on the frequency of a certain column?
    By dcolceriu in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-22-2012, 05:44 PM
  4. COUNTIF based on dates added, conditioned by another column.
    By jurax99 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-19-2012, 07:54 PM
  5. [SOLVED] countif based on value in cell in column U
    By fabrecass in forum Excel General
    Replies: 1
    Last Post: 04-13-2012, 06:57 AM
  6. COUNTIF based on another column cell values
    By jammusi in forum Excel General
    Replies: 5
    Last Post: 06-01-2010, 07:53 AM
  7. [SOLVED] An array and countif based on criteria in each column
    By Rochelle B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-25-2005, 01:05 AM

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