+ Reply to Thread
Results 1 to 5 of 5

SUMIF based on text in adjacent cell

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007, 2010, 2003
    Posts
    80

    SUMIF based on text in adjacent cell

    Hi, I am trying to count and sum numbers in other cells if column B has a specific text.

    In my sheet, I have three distinct texts in column B - "On time", "No call" and "Untimely". My sheet is used to track deliveries to a customer and I get weekly reports in a different sheet which I then copy and paste into my sheet. I would like to have each load that is delivered on time summed for an annual average, same for no call and untimely. I am trying to use a SUMIF function, but am having problems getting it to add the totals up properly.

    The 2 formulas that I have tried are =SUMIF(B:B,"=on time",C7:N153) which ends up counting each occurrence of "On time" that gives me a result of 48 (number of weeks on sheet). The other formula =SUM(IF(B:B,"=on time",C7:N153)) counts all deliveries and I get a result of 463 (total number of loads).

    Help?

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUMIF based on text in adjacent cell

    Try to match range sizes whenever possible. I would try this:

    =SUMIF(B7:B153,"On Time",C7:C153)

    =SUMIF(B7:B153,"No call",C7:C153)

    =SUMIF(B7:B153,"Untimely",C7:C153)

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUMIF based on text in adjacent cell

    I just had a thought... if you are trying to add cells from a multi-column range (Columns C:N) then my first post won't work for you... if you need to sum columns C:N based on column B, try either one of these formulas:

    REGULAR formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ARRAY Formula (Applied using Ctrl + Shift + Enter):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Moo

  4. #4
    Registered User
    Join Date
    02-13-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007, 2010, 2003
    Posts
    80

    Re: SUMIF based on text in adjacent cell

    Thanks a bunch Moo, before you replied I did your first suggestion but came back with "0" for results. I finally added the totals in cells C:N in column O and used my formula with O only and it worked. I also plugged in your regular formula and it came back very nicely. Thanks for replying and have a nice day

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUMIF based on text in adjacent cell

    Glad to help, Kevinjay1. And thanks for the feedback.

    - Moo

+ 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