+ Reply to Thread
Results 1 to 4 of 4

Adding/subtracting amounts based on text

  1. #1
    Registered User
    Join Date
    11-26-2019
    Location
    Florida
    MS-Off Ver
    Professional Plus 2016
    Posts
    54

    Adding/subtracting amounts based on text

    Hi all -
    I have an excel where I need a formula. So that it adds up the sale of each item. See the attached excel.
    As I continue to add more rows and columns, it will be time-consuming to manually select each cell.
    For example The sales for "TV." I need to select "total" and subtract "bonus" but only if the item is "TV."

    Thank you so much in advance!
    Attached Files Attached Files

  2. #2
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,140

    Re: Adding/subtracting amounts based on text

    Very simple with two SUMIF statements:

    =SUMIF($B$2:$B$6,G8,$H$2:$H$6)-SUMIF($B$2:$B$6,G8,$C$2:$C$6)

    Just set the ranges as long as they are going to need to be and position your totals boxes to the right of the table.
    Attached Files Attached Files
    Last edited by AliGW; 01-06-2022 at 11:44 AM.
    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.

  3. #3
    Registered User
    Join Date
    11-26-2019
    Location
    Florida
    MS-Off Ver
    Professional Plus 2016
    Posts
    54

    Re: Adding/subtracting amounts based on text

    Thank you so much! That worked perfectly.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,140

    Re: Adding/subtracting amounts based on text

    Glad to 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 large amounts of text in one column
    By Sara D in forum Excel General
    Replies: 22
    Last Post: 10-04-2020, 07:10 AM
  2. Replies: 2
    Last Post: 09-06-2015, 12:03 AM
  3. Adding and subtracting based on text
    By agamemnian in forum Excel General
    Replies: 4
    Last Post: 06-06-2014, 06:57 PM
  4. Replies: 25
    Last Post: 07-26-2012, 01:54 PM
  5. trouble with subtracting cells and adding text...
    By traybuddy in forum Excel General
    Replies: 4
    Last Post: 10-14-2005, 09:05 AM
  6. [SOLVED] RE: trouble with subtracting cells and adding text...
    By Gary''s Student in forum Excel General
    Replies: 1
    Last Post: 10-14-2005, 04:12 AM
  7. [SOLVED] Adding amounts based on a conditional date
    By ruleb in forum Excel General
    Replies: 3
    Last Post: 10-07-2005, 07:05 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