+ Reply to Thread
Results 1 to 7 of 7

sum positives/negatives by type

  1. #1
    Registered User
    Join Date
    06-03-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    sum positives/negatives by type

    Gross GL by type.xlsx
    Hi,

    I am looking to get "gross" figures. See attachment. I have one column with positive and negative numbers. I have another column with "types". I would like a formula that will calculate the "gross" gains or losses by type (i.e. Apples, Oranges or Bananas.)

    Hoping for a formula that doesn't require macros or coding.

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: sum positives/negatives by type

    Moshin, welcome to the forum.

    Quote Originally Posted by moshin View Post
    Attachment 220020
    I have one column with positive and negative numbers.
    Do you mean you have two columns - I13:I20, which are positive numbers, and J13:J20, which you have custom formatted, but are in fact negative numbers? Or am I looking in the wrong place?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Registered User
    Join Date
    06-03-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: sum positives/negatives by type

    Thanks so much for the welcome. First post/question! =D

    And to answer your question and clarify: I probably should have excluded column J, but it was trying to keep the example as close to my actual (can't share the actual data). But I would use the same formula used for column I in column J. I used fruit, but imagine it's "Apples" are apple stock on the NYSE, I bought over a year ago and some I bought a month ago, and for this example, for the exact same price, and then sell them all at once. I need to determine what my short term gains are and short term losses are (for my tax return). Then I need to determine what my long term gains and LT losses are. Thus the column I and J. I is for short term and J is for long term. So the numbers are the gains/losses based upon "holding period" which I use Column H to calculate in the example.

    Hope that clears up the confusion. Thanks again!

    Quote Originally Posted by BB1972 View Post
    Moshin, welcome to the forum.



    Do you mean you have two columns - I13:I20, which are positive numbers, and J13:J20, which you have custom formatted, but are in fact negative numbers? Or am I looking in the wrong place?

  4. #4
    Registered User
    Join Date
    06-03-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: sum positives/negatives by type

    In the example in the highlighted section is where I would put the formula, and currently have the "correct" answers. Thanks again!

  5. #5
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: sum positives/negatives by type

    Quote Originally Posted by moshin View Post
    Hope that clears up the confusion.
    Actually, at first, it just resulted in a lot of head-scratching! HOWEVER,I think I understand what you want now. Can you have a look at the attached, and let me know if that's what you had mind? I'm happy to explain the formula if required, but I'll save my fingers until such time as you confirm this is what you want.

    Hope this helps.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-03-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Cool Re: sum positives/negatives by type

    Oh no! But yes, your formula is exactly what I was looking for. Oddly, I had tried a formula very similar, but I think it didn't work as I was using entire columns ("A:A" versus A1:A30) and I was getting zeroes. But when I tried switching your formula to entire columns, it told me it created a circular reference (not sure why I didn't get that before). No explanation needed.... BUT THANK YOU SO MUCH!



    Quote Originally Posted by BB1972 View Post
    Actually, at first, it just resulted in a lot of head-scratching! HOWEVER,I think I understand what you want now. Can you have a look at the attached, and let me know if that's what you had mind? I'm happy to explain the formula if required, but I'll save my fingers until such time as you confirm this is what you want.

    Hope this helps.

  7. #7
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: sum positives/negatives by type

    You're welcome, moshin - glad to help.

    If you're satisfied your query has been resolved, can you please use the thread tools to mark it "SOLVED". Thank you.


    EDIT You most likely got a circular reference warning because the cell containing the formula was contained in the range the formula was working/calculating on.

    EDIT # 2 And thanks for the rep
    Last edited by BB1972; 03-11-2013 at 06:21 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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