+ Reply to Thread
Results 1 to 3 of 3

Multiplying and summing attributes that appear in a list

  1. #1
    Registered User
    Join Date
    04-16-2008
    Posts
    12

    Multiplying and summing attributes that appear in a list

    Hi,
    maybe someone can help me out with my problem.
    I have a list, 50-150 rows long. The list is being filled regulary, and sometimes the word "Box" will pop up, followed by its width, hight and length, like this:
    ----
    ----
    Box
    width 10
    hight 20
    length 30
    ----
    ----
    What I want to achieve is to sum the volumes of ALL boxes that pop up in the list.
    Im thinking i could do this by locating the first "box" by searching from the top, multiplying the attributes with the shift or dislocate function or whatever its called in english, and search for the next "box" from there. However this would meen a very big formula...Could this be a task for Mr. Sumproduct perhaps...?
    It will pop up 6-7 times.

    Thanks
    /Johan

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Indeed, SUMPRODUCT will work.

    =SUMPRODUCT(--(A1:A101="box"),A2:A102,A3:A103,A4:A104)

    The arrays in SUMPRODUCT, and other array type formulas, must have the same number of elements, but they do not have to all start on the same row.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    04-16-2008
    Posts
    12
    Perfect
    Thanks alot!

+ 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