+ Reply to Thread
Results 1 to 5 of 5

Calculate Profits

  1. #1
    Registered User
    Join Date
    06-10-2021
    Location
    Florida, US
    MS-Off Ver
    2016
    Posts
    33

    Question Calculate Profits

    Greetings,

    I need help doing a formula that will go through all the sales in this spreadsheet and find the difference. Sounds simple...until you realize the requirements for successful automation and reliable calculations finding values in the spreadsheet that can be separated by and unknown number of rows. I cannot for the life of me figure out how to target specific values in cells to find the differences. The formula must be required to click and drag down all the way through the spreadsheet. See attachment for where I'm currently at with it.

    Row 70, column D, specifies a sale. Column K calculates the current balance. Column M needs to be where I find out the "take profit" (or Gains/Losses) of each transaction.

    The answer for row 70 should be $196.80 (its the first sale ever, so technically 196.80 - 0 = 196.80). Then after that, the next sale needs to be 202.73 - 196.80 = $5.93. Between these 2 sales, 1 row of purchases were made. Between sales 2 and 3 (cells K73 and K77 respectively), 3 rows of purchases were made.

    In this WIP, column M shows intuitively what our brains would do to calculate the numbers with paper and pencil. Column N is dumb stuff I've tried to make progress on obtaining the result, and is most likely nowhere close to the path I should be taking to write an advanced formula to pick out all the sales in the sheet.

    Let me know if any more clarity is needed.

    Thank you all for taking the time to help assist me.
    Attached Files Attached Files
    Last edited by XanaduCSIV; 06-10-2021 at 04:53 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,269

    Re: Calculate Profits

    Welcome to the forum.

    Not sure I get it, but maybe you try this array formula in M6 and confirm with Ctrl+Shift+Enter instead of just Enter. Then copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!
    Last edited by Estevaoba; 06-10-2021 at 06:31 PM.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,504

    Re: Calculate Profits

    Alternative with non array formula:

    Please Login or Register  to view this content.
    Quang PT

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,106

    Re: Calculate Profits

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.
    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
    06-10-2021
    Location
    Florida, US
    MS-Off Ver
    2016
    Posts
    33

    Re: Calculate Profits

    Yes, I will mark this as solved and add to reputations. It took me a few days to verify the calculations to make sure I got the desired results!

    Thank you everyone for your time and your help! I am very grateful and appreciate all of you getting me in the right direction!

+ 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: 3
    Last Post: 05-18-2020, 07:10 AM
  2. Automatically Calculate Stock Profits In Logbook
    By SamuraiSam83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2015, 09:58 PM
  3. [SOLVED] A complex formula to calculate the profits
    By shimaa01234 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-29-2015, 03:44 PM
  4. List of top five gross profits
    By sherlock1241 in forum Excel General
    Replies: 2
    Last Post: 02-14-2014, 06:30 AM
  5. Calculate Gross and Net Profits
    By monkfunk in forum Excel General
    Replies: 5
    Last Post: 10-18-2009, 06:08 PM
  6. Help solving profits in excel
    By pepsi in forum Excel General
    Replies: 10
    Last Post: 03-17-2009, 02:13 PM
  7. [SOLVED] Offsetting losses against profits
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2005, 08:06 PM

Tags for this Thread

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