+ Reply to Thread
Results 1 to 6 of 6

Trying to use Counta but only if another column = x

  1. #1
    Registered User
    Join Date
    02-15-2016
    Location
    Rensselaer, IN
    MS-Off Ver
    2013
    Posts
    3

    Post Trying to use Counta but only if another column = x

    I currently have =COUNTA(Attendance!C:C) to count entries and show how many people are here today.

    This counts everyone here but I need to only count for a specific department so it should only count if the same row column B = X.

    I would think this would be easy but the solution eludes me.

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

    Re: Trying to use Counta but only if another column = x

    COUNTIFS can do
    =COUNTIFS(B:B,"X",C:C,"<>"&"")
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    04-09-2013
    Location
    Philippines, Manila
    MS-Off Ver
    Excel 2010
    Posts
    140

    Re: Trying to use Counta but only if another column = x

    Hi Feril,

    Use =COUNTIF(Attendance!B:C, "X")

    tnx tnx

  4. #4
    Registered User
    Join Date
    02-15-2016
    Location
    Rensselaer, IN
    MS-Off Ver
    2013
    Posts
    3

    Re: Trying to use Counta but only if another column = x

    Jarvin24 yours doesn't work at all. I have 21 people in column a, 11 with X in column b and not all eleven were here so column C was blank for 2. That means it should return 8 and it returned 15.

    Column A name, b department, c checkmark if they are here blank if absent.

    bebo021999 I am trying to understand yours can you break it down for me?

    IT works as =COUNTIFS(Attendance!B:B,"X",Attendance!C:C,"<>"&"")

    I understand if b = x then return Attendance!C:C

    but what are the <> and & for?

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

    Re: Trying to use Counta but only if another column = x

    "" indicates blank cell (cell with nothing, length=0)
    "<>"&"" indicates cells those are not blank

  6. #6
    Registered User
    Join Date
    02-15-2016
    Location
    Rensselaer, IN
    MS-Off Ver
    2013
    Posts
    3

    Re: Trying to use Counta but only if another column = x

    Ok thanks that's what I was missing as I was actually trying to do that but couldn't get the syntax right. Thanks a bunch!

+ 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. [SOLVED] COUNTA from value in diferent column
    By lescrowe in forum Excel General
    Replies: 6
    Last Post: 09-22-2014, 02:00 AM
  2. [SOLVED] Hide the column if they have counta value is greater than 0(zero)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2014, 02:50 AM
  3. Replies: 3
    Last Post: 06-09-2012, 11:18 PM
  4. [SOLVED] Counta of a column G if column B = matching text
    By Aisling in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-01-2012, 06:45 AM
  5. [SOLVED] How to CountA for Column Where Header = Something
    By alfykunable in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-01-2012, 05:48 AM
  6. Multi-Column Counting - COUNTA or other Options
    By argomike in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 01-28-2012, 03:54 PM
  7. COUNTA based on match in another column
    By nothingisthis in forum Excel General
    Replies: 3
    Last Post: 05-04-2011, 07:07 PM

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