+ Reply to Thread
Results 1 to 2 of 2

excel macro not dividing by the right sum (percentage macro)

  1. #1
    Registered User
    Join Date
    05-06-2010
    Location
    TLV
    MS-Off Ver
    Excel 2003
    Posts
    6

    excel macro not dividing by the right sum (percentage macro)

    Hi.

    I have few numbers that sum up to 100 (percentage) in excel spreadsheet. When a user changed one of the numbers the sum was changed too, obviously. Lets call this sum value "S". I need a macro to change the values of the rest of the nubers (proportionally) in order that the sum "S" will be 100 again.

    To do that, each one of the values needs to be divided by "S" and multiply by 100. I wrote following macro code for excel. It "almost" working: I need to divide each number by the intial sum"S" but it dividing each number by the most updated Sum each time.

    Please help me to correct this macro. Thanks!

    Please Login or Register  to view this content.
    Last edited by MichaelSSSS; 05-06-2010 at 07:00 AM. Reason: changing title per forum rules

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: excel macro question

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Also, use code tags when posting code! I'll add them for you this time, but read and follow this:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ 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