+ Reply to Thread
Results 1 to 4 of 4

Comparing One Range and Adding Another

  1. #1
    Registered User
    Join Date
    12-08-2005
    Posts
    4

    Comparing One Range and Adding Another

    Hi,

    For one of my sheets, I need to sum all the values in A1:A10 for which the corresponding value in B1:B10 is less than 30. For example

    A B
    2 40
    5 20
    10 50
    20 10

    Would equal 25 (A2+A4 because B2 and B4 are both less than 30, but B1 and B3 are not).

    Thanks!

  2. #2
    ScottO
    Guest

    Re: Comparing One Range and Adding Another

    Take a look at the SUMIF function.
    Rgds,
    ScottO

    "statusquo" <[email protected]>
    wrote in message
    news:[email protected]...
    |
    | Hi,
    |
    | For one of my sheets, I need to sum all the values in A1:A10 for
    which
    | the corresponding value in B1:B10 is less than 30. For example
    |
    | A B
    | 2 40
    | 5 20
    | 10 50
    | 20 10
    |
    | Would equal 25 (A2+A4 because B2 and B4 are both less than 30, but
    B1
    | and B3 are not).
    |
    | Thanks!
    |
    |
    | --
    | statusquo
    | -------------------------------------------------------------------
    -----
    | statusquo's Profile:
    http://www.excelforum.com/member.php...o&userid=29501
    | View this thread:
    http://www.excelforum.com/showthread...hreadid=492058
    |



  3. #3
    Gord Dibben
    Guest

    Re: Comparing One Range and Adding Another

    =SUMIF(B1:B10,"<30",A1:A10)


    Gord Dibben Excel MVP


    On Thu, 8 Dec 2005 19:00:02 -0600, statusquo
    <[email protected]> wrote:

    >
    >Hi,
    >
    >For one of my sheets, I need to sum all the values in A1:A10 for which
    >the corresponding value in B1:B10 is less than 30. For example
    >
    >A B
    >2 40
    >5 20
    >10 50
    >20 10
    >
    >Would equal 25 (A2+A4 because B2 and B4 are both less than 30, but B1
    >and B3 are not).
    >
    >Thanks!


  4. #4
    Registered User
    Join Date
    12-08-2005
    Posts
    4
    Thank you, that worked perfectly.

+ 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