+ Reply to Thread
Results 1 to 4 of 4

using Sumproduct but looking up which column to sum

  1. #1
    Registered User
    Join Date
    02-06-2011
    Location
    Helsingborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    4

    using Sumproduct but looking up which column to sum

    So.. im stuck. Mainly due to my newbie skills.

    For easy usage, i need to use Sumproduct (or something else) to sum up a column of numbers. However, i want the formula to find the corresponding Store Name before doing the sum. It also has a restriction to only sum value if Cell A contains a specific word.

    see the file attached. its easier.



    its probably an easy formula. But im stuck

    example.xlsx

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: using Sumproduct but looking up which column to sum

    =sumproduct((index($c$2:$l$12,0,match(a17,$c$1:$l$1,0)))*($a$2:$a$12="sell")*1)

    or
    =SUMPRODUCT((INDEX($C$2:$L$12,0,MATCH(A17,$C$1:$L$1,0)))*($A$2:$A$12=$B$16)*1)

    B16=Sell
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: using Sumproduct but looking up which column to sum

    hi alexandaer. maybe:
    =SUMPRODUCT($C$2:$L$12*($A$2:$A$12="SELL")*(C$1:L$1=A17))

    or:
    =SUMIF($A$2:$A$12,"sell",INDEX($C$2:$L$12,,MATCH(A17,$C$1:$L$1,0)))

    SUMIF works faster

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    02-06-2011
    Location
    Helsingborg, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: using Sumproduct but looking up which column to sum

    Thank you both!

    works like a charm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SUMPRODUCT - Every other column
    By Jabba in forum Excel General
    Replies: 6
    Last Post: 03-23-2009, 11:56 AM
  2. SUMPRODUCT - If column 'X' Does not contain
    By Badvgood in forum Excel General
    Replies: 1
    Last Post: 02-12-2007, 08:28 AM
  3. Using Column in Sumproduct
    By PeterW in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-19-2006, 03:10 PM
  4. Sumproduct with Date column
    By JerryS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 01:05 AM
  5. Sumproduct within the same column
    By Mr.Cellophane in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2005, 05:07 PM

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