+ Reply to Thread
Results 1 to 7 of 7

Thread: How do I add positive numbers and subtract any negative version of those numbers??

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    4

    How do I add positive numbers and subtract any negative version of those numbers??

    In Excel 2007, I have a bunch of columns with one number in each column. Some positive, some negative. How do i count the amount of positives and subtract the count of only the negative numbers that are equal to the positive numbers (ex. there is a 2 , and there is a -2.)?? Thanks.

  2. #2
    Registered User
    Join Date
    11-03-2011
    Location
    Shelton, CT
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: How do I add positive numbers and subtract any negative version of those numbers?

    Use the Countif Functon..... example =COUNTIF(A1:A6,"< 0") will count all negative numbers then you can use =COUNTIF(A1:A6,">0") for all positive numbers..using these together in your formula will yield the results

    =SUM(COUNTIF(A1:A6,">0")-COUNTIF(A1:A6,"< 0"))
    Last edited by optomyst; 11-03-2011 at 03:36 PM.

  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How do I add positive numbers and subtract any negative version of those numbers?

    I use =countif(range,">0") - countif(range,"<0")...however that automatically counts, for example, a purchase of 1 and a return of 0.5 as a 0. I need a formula that will still keep that as a 1. FYI, this is for a purchases and returns report. So if a customer buys 1 case and return half the next day, its still considered a purchase (1). Any ideas? Someone showed me a formula that started off {=sum(if......and I cant remember the rest bc it was lost. Thanks.

  4. #4
    Registered User
    Join Date
    11-03-2011
    Location
    Shelton, CT
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: How do I add positive numbers and subtract any negative version of those numbers?

    Ky,

    ... a sale is a positive number.. and a return is a negative number? Also, any partial case, needs to be rounded to the next whole number? for exam. .5 = 1 and -.5 = -1?

  5. #5
    Registered User
    Join Date
    11-03-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How do I add positive numbers and subtract any negative version of those numbers?

    Yes. Positive and negative. However, NO ROUNDING. As long as a return (ex. returned half a case (-0.5)) doesnt negate a purchase or sale (ex. bought one case (1)), there is still a sale. My formula says that in this example, there was no sale, bc it subtracts the amount of negative numbers from the amount of positive numbers. It doesnt consider the actual value of the cells. Any ideas?

  6. #6
    Registered User
    Join Date
    11-03-2011
    Location
    Shelton, CT
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: How do I add positive numbers and subtract any negative version of those numbers?

    Can you send me an example ..and the correct answer you are looking for?

  7. #7
    Registered User
    Join Date
    11-03-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How do I add positive numbers and subtract any negative version of those numbers?

    OK attached is a file demonstrating what the answer is with my formula and what the answer should be. Thanks for the help.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0