+ Reply to Thread
Results 1 to 7 of 7

Write negatives against positives in the same column

  1. #1
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Write negatives against positives in the same column

    Good Day,

    I have an issue. I have a list of negatives and positives and I need to decrease the positives against the negatives that relate to the same person in column C.
    The attached file has the numbers in column P. In column P, the first negative number in P14 should be reduced against the figure in P3, and if any is left it goes against P4. When the figure in P14 is used up, the macro moves to P15 and start to reduce P3 if there is still a balance, and so on and so forth.

    If it gets to P16 and all the amounts over P14 has been zeroed out, then it moves to zero out the amounts in P17, and then to P18 to P27. and the cycle continues if there is more than one line per name.

    See the attached file.
    Xrull
    Attached Files Attached Files
    Last edited by Xrull; 04-02-2015 at 07:57 AM.

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Write negatives against positives in the same column

    Hi Xrull,

    why would P14 be balanced against P2?
    You mention that the negatives should be balanced against the same person.
    P2 = "Mr.A" (column D), 64 (column C), while P14 is "Mr. B" (column D), 65 (column C).

    Are you sure that is correct?

    Otherwise, just use a sumif?

    =SUMIF(C:C,64,P:P)
    Please click the * below if this helps

  3. #3
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Write negatives against positives in the same column

    Sorry about that JasperD, I should have said P3 instead of P2.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Write negatives against positives in the same column

    Alright, then why don't you just use sumif to get the final result?

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Write negatives against positives in the same column

    Pl show expected results in file( How it is to be displayed).

  6. #6
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Write negatives against positives in the same column

    Kvsr,

    The figures in P would be reduced by the negatives, and in some instances, the negative figures would be zero, or reduced by the unused amount.

  7. #7
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Write negatives against positives in the same column

    JasperD,
    The aim of the macro is to keep deducting a portion of the negative amounts from the positive amounts to see if there is a balance on the negatives. With some of the names, a balance might be left on a portion of some of the positives, and zero on the negative, or zero on some of the positives, and zero on the negatives.
    Thanks,
    Xrull

+ 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] Best Chart for mix of positives and negatives
    By Eric S in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-22-2013, 10:37 PM
  2. % Calculation - negatives vs positives
    By SystemsAccountant in forum Excel General
    Replies: 3
    Last Post: 09-15-2009, 04:10 AM
  3. Matching negatives and positives once
    By Xrull in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-01-2009, 10:01 PM
  4. Negatives to Positives, Positives to Negatives
    By Virginia Woolf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2007, 08:59 PM
  5. [SOLVED] Positives and Negatives
    By Niagera College Student in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-20-2005, 06: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