Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Row Counting formula question

Latest post Wed, Jul 25 2012 4:16 PM by annewtsn. 2 replies.
  • Wed, Jul 25 2012 3:44 PM

    • annewtsn
    • Not Ranked
    • Joined on Wed, Jul 25 2012
    • Posts 2
    • Points 26

    Row Counting formula question

    I am having some trouble coming up with the right formula for a project at work.

    I have a spreadsheet that is counting individual volunteers and groups and the number of hours in which they serve.  Column A is the number of persons serving, B and C are their names and D through I count the number of hours they worked at the particular jobs.

    I am trying to total the number of people who perform a certain job and am struggling with the right syntax.  Basically what I want to do is if the number in column D is not null, I want to total the number in column A.  To count the number of persons, I tried this formula, =IF(COUNTA(D2:D43),SUM(A2:A43)) However, that totals all the persons in column A, not just the ones with values in column D.  

    Any help you could provide would be appreciated.

    Here is a link to the spreadsheet: https://docs.google.com/spreadsheet/ccc?key=0ArVjFVNrzfMUdFRtX3JwVVE1R2h0RFRoSUNnZWMyMmc

    Areas in yellow are the cells in question

     

    • Post Points: 21
  • Wed, Jul 25 2012 4:11 PM In reply to

    • PeterG
    • Top 10 Contributor
    • Joined on Mon, Feb 25 2008
    • Posts 154
    • Points 2,268

    Re: Row Counting formula question

    Try the SUMIF formula

    =SUMIF(D2:D43,">0",A2:A43)

    Peter

    • Post Points: 21
  • Wed, Jul 25 2012 4:16 PM In reply to

    • annewtsn
    • Not Ranked
    • Joined on Wed, Jul 25 2012
    • Posts 2
    • Points 26

    Re: Row Counting formula question

    Thank you Peter - SumIF worked perfectly. 

    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.