+ Reply to Thread
Results 1 to 8 of 8

Counting values in an adjoining column of non-null data

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    indiana
    MS-Off Ver
    Excel 2003
    Posts
    4

    Counting values in an adjoining column of non-null data

    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.
    Last edited by annewtsn; 07-25-2012 at 04:17 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: IF Formula question

    You get better help if you post an Excel-example of your workbook, without confidential information.

    Make sure the workbook demonstrates your desired results if possible, or just highlight the cells you're trying to fix.

    Use BEFORE/AFTER sheets if that helps make it clearer.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: IF Formula question

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.


  4. #4
    Registered User
    Join Date
    07-25-2012
    Location
    indiana
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: IF Formula question

    The yellow highlighted cells are the ones in questionexample.xlsx

  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    indiana
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Counting values in an adjoining column of non-null data

    Title changed. Sorry.

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

    Re: Counting values in an adjoining column of non-null data

    Possibly:

    =SUMIF(D2:D43,"<>",A2:A43)
    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.

  7. #7
    Registered User
    Join Date
    07-25-2012
    Location
    indiana
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Counting values in an adjoining column of non-null data

    Yes - that worked! Thank you!

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Counting values in an adjoining column of non-null data

    See the example.

    Notice I changed your sheet.

    The result is in R2 - S8 ( the red cells).

    When you change the input this way, you have a table.

    In that case it is mutch easier to count / reproduce data.

    I worked with defined names:

    Excel 2007 => formula => defined names.

    I worked with datavalidation

    Excel 2007 => data => datavalidation => list => job

    Do you have questions, on this item, just ask.

    Please reply your opinion.
    Attached Files Attached Files

+ 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