+ Reply to Thread
Results 1 to 4 of 4

How to create the formula to determine: addition when "Bought" subtraction when "Sold"

  1. #1
    Registered User
    Join Date
    07-07-2018
    Location
    Wakanda
    MS-Off Ver
    14.7.3
    Posts
    2

    Smile How to create the formula to determine: addition when "Bought" subtraction when "Sold"

    Hi, I wish to string a formula but I couldn't get it no matter how many times I attempt it. Please teach me how to do this.

    Under [Type], if it is selected to "Bought" it will do an addition of J+K+L+M+N to answer to appear at cell [O]

    However when it is selected to "Sold" it will do a subtraction of J+K+L+M+N to answer to appear at cell [O]

    Screen Shot 2018-07-07 at 12.53.21 PM.png

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,912

    Re: How to create the formula to determine: addition when "Bought" subtraction when "Sold"

    Try this:

    =IF(H5="Bought",SUM(J5:N5),J5-SUM(K5:N5))
    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
    07-07-2018
    Location
    Wakanda
    MS-Off Ver
    14.7.3
    Posts
    2

    Re: How to create the formula to determine: addition when "Bought" subtraction when "Sold"

    It worked! Thank you!!

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,912

    Re: How to create the formula to determine: addition when "Bought" subtraction when "Sold"

    You’re welcome!

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

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  6. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  7. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM

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