Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    sumif with 'or' text conditions (2003)

    A simple sumif problem, with a little twist: I would like to sum the numerical values in the range B1:B10 that correspond to the cells in the range A1:A10 that contain the names "John", "Mary", or "Joe".
    Any ideas?
    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sumif with 'or' text conditions (2003)

    You could use

    =SUMIF(A1:A10,"John",B1:B10)+SUMIF(A1:A10,"Mary",B 1:B10)+SUMIF(A1:A10,"Joe",B1:B10)

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: sumif with 'or' text conditions (2003)

    Thanks Hans. I was being a little near-sighted and trying to put all the conditions into one expression ;-)

  4. #4
    3 Star Lounger
    Join Date
    Nov 2005
    Location
    Asia Pacific, Bangkok Metropolis
    Posts
    378
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sumif with 'or' text conditions (2003)

    here a shorter version with all conditions in one expression

    =SUM(SUMIF(A2:A10,{"Joe","John","Mary"},B2:B10))

    HTH
    Hope this is helpful

    francis, <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    My Reading

    Pivot Table 101
    Pivot Table
    Array

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: sumif with 'or' text conditions (2003)

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •