+ Reply to Thread
Results 1 to 5 of 5

Formula for counting specific nonblank cells in column, dependant on data in anothr column

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    25

    Formula for counting specific nonblank cells in column, dependant on data in anothr column

    Hey guys!

    So i have two sheets. The first sheet has data of all candidates that have taken different sessions, and data about the attendance on those sessions. What I need is a formula that counts the nonblank cells in a column, dependent on the label of that row.

    For example Sheet1 looks like this:

    Please Login or Register  to view this content.
    Sheet2 should look like this:

    Please Login or Register  to view this content.
    Thus I need a formula for cells in the second sheet that counts the nonblank cells in the 'Attendance' column.

    I managed to figure out a formula that summed up the values in another column, dependent on the sessioncode, that formula looked like this:

    {=SUM(IF('Sheet1'!$B:$B='Sheet2'!$B2, 'Sheet1'!$D:$D))}

    thus i thought a counta formula should work:

    {=CountA(IF('Sheet1'!$B:$B='Sheet2'!$B2, 'Sheet1'!$C:$C))}

    But it doesn't, it just counts everything. What am I doing wrong?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Formula for counting specific nonblank cells in column, dependant on data in anothr co

    Perhaps something like
    Please Login or Register  to view this content.
    The strings can be replaced by cell reference of course

    A Pivot Table would also help

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Formula for counting specific nonblank cells in column, dependant on data in anothr co

    Hiya! Lets just say that i can't make use of pivot tables, for other reasons. Any ideas why my array formula doesn't work?

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Formula for counting specific nonblank cells in column, dependant on data in anothr co

    Not being in the guessing business I don't know, but if you post a sample sheet, perhaps.

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Formula for counting specific nonblank cells in column, dependant on data in anothr co

    Nevermind, I just tested your solution, works brilliantly! Thank you!

+ 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