+ Reply to Thread
Results 1 to 10 of 10

Adding Up all Row totals when one cell contains A or B

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    East Yorkshire
    MS-Off Ver
    Office 365
    Posts
    42

    Adding Up all Row totals when one cell contains A or B

    Hi,
    Hope your all well? Please see the attached, we have cargo coming in from Area L and Area B. I would like to figure out each month how much comes from each area. Then if possible do the same again but instead of all units its just the timber units?
    Many Thanks in advance
    Regards
    Faye
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,660

    Re: Adding Up all Row totals when one cell contains A or B

    Do you mean like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    East Yorkshire
    MS-Off Ver
    Office 365
    Posts
    42

    Re: Adding Up all Row totals when one cell contains A or B

    Hi,
    Thank you the bottom one worked fantastic. Now if I wanted to do all cargo do I just change the sum from D3:K15? Many Thanks Faye

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Adding Up all Row totals when one cell contains A or B

    No - you'd need SUMPRODUCT. Try:

    =SUMPRODUCT(('Cargo 2023'!C3:C15="L")*'Cargo 2023'!D3:K15)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    03-13-2013
    Location
    East Yorkshire
    MS-Off Ver
    Office 365
    Posts
    42

    Re: Adding Up all Row totals when one cell contains A or B

    Thank you, I just need to figure out how to use the formula and add the sheet name I need the details from, if that makes sense?
    Thank you
    Faye

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Adding Up all Row totals when one cell contains A or B

    Replace Cargo 2023 with the sheet name of the sheet containing the data.

    If you can't work it out, attach a workbook.

    If you mean by row and column, does this help?

    =SUMPRODUCT($D$3:$K$15,($C$3:$C$15="L")*($D$2:$K$2="Pulp"))
    Last edited by AliGW; 10-13-2023 at 04:57 AM.

  7. #7
    Registered User
    Join Date
    03-13-2013
    Location
    East Yorkshire
    MS-Off Ver
    Office 365
    Posts
    42

    Re: Adding Up all Row totals when one cell contains A or B

    Thank you, I've tried to add in the sheet but keep getting an error message. So on my Lake vs Baltic I need to figure out from the Cargo sheet the total number of Lake vessels, then the total number of Baltic vessels. Then in the months figure out the total amount of Timber from each area. I've attached the spreadsheet I'm working on. Many Thanks again for all your help, I'm learning new things all the time. Thanks Faye
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Adding Up all Row totals when one cell contains A or B

    B6:

    =SUMPRODUCT('Cargo 2023'!$D$3:$K$15,('Cargo 2023'!$C$3:$C$15="L")*('Cargo 2023'!$D$2:$K$2="Timber"))

    C6

    =SUMPRODUCT(('Cargo 2023'!$D$3:$K$15<>"")*('Cargo 2023'!$C$3:$C$15="L")*'Cargo 2023'!$D$3:$K$15)

    Adapt for other months and commodities.

  9. #9
    Registered User
    Join Date
    03-13-2013
    Location
    East Yorkshire
    MS-Off Ver
    Office 365
    Posts
    42

    Re: Adding Up all Row totals when one cell contains A or B

    Thank you thats perfect. Have a lovely day

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Adding Up all Row totals when one cell contains A or B

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ 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. [SOLVED] Adding together any two given totals
    By tom hatten in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-26-2017, 12:02 PM
  2. [SOLVED] Adding Totals To Worksheet
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2017, 11:54 AM
  3. [SOLVED] Cell Refrencing multiple sheet totals to a totals page
    By 007Buff in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-08-2015, 02:23 PM
  4. Adding a new Totals Column
    By jstadtler in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-04-2014, 03:29 PM
  5. Adding up adjacent cell totals with a IF statement
    By visayaman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-10-2014, 12:31 PM
  6. adding totals up
    By penguinJen in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-30-2013, 07:00 PM
  7. Adding pictures into excel, linked to cell totals.
    By Harrydad57 in forum Excel General
    Replies: 3
    Last Post: 12-16-2010, 08:50 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