+ Reply to Thread
Results 1 to 3 of 3

Code to allocate a value 1 row at a time until the variance between 2 cells disappears

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    12

    Code to allocate a value 1 row at a time until the variance between 2 cells disappears

    Hi

    I hope i can explain this properly! I need a macro to round cells to 2 decimal places and then find the variance between the total of these cells and a cell price and allocate pennies to each row so that there is no longer a variance

    Untitled.png

    Example - if you round the attached figures up they come to 7196.42 rather than the 7196.44 they need to add up to.

    The macro need to allocate the 2p difference to a line - i am happy for the macro to go through each line until the variance is gone.

    I dont think this is an easy one! Sorry!!

  2. #2
    Registered User
    Join Date
    05-03-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Code to allocate a value 1 row at a time until the variance between 2 cells disappears

    This may explain it a little better

    Cell C81 is 7196.44
    Cell A12 is 7196.42

    I need a macro to add 0.01 to each row (column A) until C81 and A12 match

    This really has me confused!

  3. #3
    Forum Contributor
    Join Date
    03-28-2013
    Location
    *
    MS-Off Ver
    Excel 2010
    Posts
    226

    Re: Code to allocate a value 1 row at a time until the variance between 2 cells disappears

    Please Login or Register  to view this content.
    Give Feedback and Click(*)

+ 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.6.0 RC 1