+ Reply to Thread
Results 1 to 9 of 9

Summing similar items

  1. #1
    Registered User
    Join Date
    05-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    4

    Question Summing similar items

    Hi - I assume that this will require a macro if not please forgive a newbie.


    I have an excel workbook that will contain about 20 worksheets. The 20 sheets are similar in layout but have different numbers of rows and different numbers of column repeats (see below).

    Each spreadsheet has less than 1000 rows and 32 to 44 columns.

    There are 3 columns that repeat between 4 and 8 times.

    These 3 columns are: item, quantity (for each product) and total items per product (total items is calculated).

    Each item may be in any one of the repeats.

    I would like to be able to sum the total items per product of all items with the same name within a selected area and within the whole sheet. These sub-totals I'd like to keep on the sheet with the other information but at the side as a list of items and the sub total for each item.

    I'm a newbie to excel and don't have a clue where to start to do this.

    I'm sorry if this description isn't completely clear and that the attached part spreadsheet helps. Please ask me and I'll try to clarify specific points.
    I'd greatly appreciate some help.
    Attached Images Attached Images

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Summing similar items

    I don't know about Excel 2000 so I don't even know if this formula is available, but if so...

    U4 =SUMIF($C$4:$O$21,S4,$E$4:$Q$21) copied down

    if not then try

    =SUMPRODUCT(--($C$4:$O$21=S4),$E$4:$Q$21)
    Last edited by jeffreybrown; 05-23-2012 at 07:01 PM.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    05-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    4

    Re: Summing similar items

    Hi thanks that's perfect.

    I can now sum the whole sheet.

    I've tried substituting =SUMIF(Selection,S4,$E$4:$Q$21) and some variations so that I can sum only a selected area but I just get an error #NAME

    Is there an equally simple solution that will sum just a selected area?

    Regards and thanks

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Summing similar items

    so =sumif() IS available in 2000?

    if so, in your formula, you use "selection" is that an actual named range in your workbook? if you dont have a range created with that name, that many be causing the error
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    05-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    4

    Re: Summing similar items

    Yes sumif is in 2000 and no I haven't named a range selection I was trying to use the Selection property.

    But thank you for the idea.

    Naming the two ranges in the original formula Items and Totals. I end up with =SUMIF(Items,S4,Totals). It's rather clumsy having to manually name the two ranges but it works so if no one can improve on it I can live with it.

    Thanks

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Summing similar items

    Johnnyz,

    Have a look at dynamic named ranges. here's a couple links to get you started:
    http://support.microsoft.com/kb/830287
    http://www.contextures.com/xlNames01.html
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Summing similar items

    i wasnt suggestion you use range names, just asking if you were trying to, but if they work for you thats great...i find its often easier (and sometimes makes more "readability") to use range names.

    I didnt look at TA's dynamic ranges, but they can be very helpful too

  8. #8
    Registered User
    Join Date
    05-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    4

    Re: Summing similar items

    Hi FDibbins

    The links are useful for my future reference but don't fit with my current problem. Looks Like I'll just do it the clunky way.

    Thanks for your help.

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Summing similar items

    Hi Johnnyz,

    No need to do something the "clunky way" is there is an sound method available.

    If you post a workbook (not a picture) of your current setup/layout and what you desire, maybe we can help spot a workable solution.

+ 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