Results 1 to 5 of 5

Thread: Invert percentages

  1. #1

    Thread Starter
    Fanatic Member WorkHorse's Avatar
    Join Date
    Jul 2002
    Location
    Where you live.
    Posts
    591

    Invert percentages

    For some reason I'm having a brain freeze on this. I want to invert percentages. For example:

    a = 1 : 17%
    b = 2 : 33%
    c = 3: 50%

    Calculation is simply n/(a+b+c). But I want it inverted such that

    a = 1 : 50%
    b = 2 : 33%
    c = 3: 17%

    What's the formula I'm looking for?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Invert percentages

    Don't understand the question. How do you get a, b, c?

  3. #3
    Lively Member
    Join Date
    Sep 2005
    Location
    Florida
    Posts
    107

    Re: Invert percentages

    You could do (4 - N) / (a + b + c)

    N 4-N 4-N / (a+b+c)

    1 3 50%
    2 2 33%
    3 1 17%


    ??

    Tom

  4. #4
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: Invert percentages

    Put the objects in an array, then use Array.Reverse (or whatever Array.Reverse would be in VB6, if they have anything like that) ... of course, not sure why this is in the maths forum, unless I am missing something...

  5. #5
    Lively Member
    Join Date
    Dec 2005
    Location
    middle earth
    Posts
    95

    Re: Invert percentages

    This seems a bit vague but anyways,

    a=100-b-a;
    c=100-a-b;//new value of a.
    b=100-c-a.//new value of c and a.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width