+ Reply to Thread
Results 1 to 4 of 4

Searching one column for certain values then summing values from another column.

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    2

    Searching one column for certain values then summing values from another column.

    Hi,

    I was wanting to know if there was a formula in excel that can achieve the following:

    I have one column of random numbers from 1 to 10 and a corresponding column with either a 0 or 1. i.e.

    Column A Column B
    2 0
    5 1
    9 1
    7 0
    9 0
    6 1
    5 1

    What I want to do is to search column A for numbers >5 and then sum the corresponding values in column B. So for this example I want it to select: 9, 7, 9, 6, and then sum their corresponding column B values (1+0+0+1=2).

    Hopefully I've explained it clearly enough, if not let me know and I'll try again.

    Thanks

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Searching one column for certain values then summing values from another column.

    Try

    =SUMPRODUCT((A1:A10>5)*(B1:B10))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    01-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Searching one column for certain values then summing values from another column.

    That seems to work, Thanks for your help.

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Searching one column for certain values then summing values from another column.

    Hi

    use the SUMIF:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

+ 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