+ Reply to Thread
Results 1 to 3 of 3

How to sum a range of numbers only if values pass "if statement"

  1. #1
    Registered User
    Join Date
    10-27-2008
    Location
    Richmond, VA
    Posts
    2

    How to sum a range of numbers only if values pass "if statement"

    I have a spreadsheet that contains the following data:

    If the person is a contract worker - displayed as "Y" or "N"
    Hours spent on a project - number value

    What I want to do is to have a forumla create a sum total of project hours, but only if the person has "Y" in their contract worker cell.

    The purpose of this is to total the amount of hours contract workers will be spending on a project, and to have this value dynamically update if a person changes from a contract worker to an in-house worker.

    So I need it create a sum value of cells B1:B5, but only if the cooresponding A cell value = "Y".

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    Try SUMIF, i.e.

    =SUMIF(A1:A5,"Y",B1:B5)

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

    =Sumif(A1:A5,"Y",B1:B5)
    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.

+ 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