+ Reply to Thread
Results 1 to 7 of 7

Formula to only calculate totals when text entered in other cells

  1. #1
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Formula to only calculate totals when text entered in other cells

    A1:A10 = random amounts entered
    B1:B10 = text entry
    C1 = formula
    Right now I have C1 totaling A1:A10 and populating the sum by using =SUM(A1:A10)
    I want to add into the formula to only sum the amounts in A1:A10 if “R” is entered into B1:B10

    See Attached Spreadsheet
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to only calculate totals when text entered in other cells

    Hi,

    =SUMIF(B:B,"R",A:A)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Re: Formula to only calculate totals when text entered in other cells

    im sorry, I meant to reverse that. I wanted it not to SUM all totals except the ones where as "R" was entered into B:B

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to only calculate totals when text entered in other cells

    =sumif(b:b,"<>r",a:a)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to only calculate totals when text entered in other cells

    "I wanted it not to SUM all totals except the ones where as "R" was entered into B:B"

    So this "not" shouldn't be in that sentence? Otherwise it's getting extremely confusing!

    Either way:

    =SUMIF(B:B,"<>R",A:A)

    Regards

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to only calculate totals when text entered in other cells

    Based on the sample file tell us which cells should be summed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Re: Formula to only calculate totals when text entered in other cells

    thx I appreciate it

+ 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