Jump to content

calculate percentage for more then 3 varibles, need some help!


Recommended Posts

hi all,

 

i want to know how to calculate the percentage for each total but i looked around and i cant seem to find it.

 

lets say i have a bar which is 100%

 

and i want to show in the bar someting like this:

 

value 1 = 19

value 2 = 33

value 3 = 12

value 4 = 5

value 5 = 129

 

i want for each of the value's a percentage which add's up to 100 % like:

 

value 1 = 6%

value 2 = 18%

value 3 = 4%

value 4 = 1%

value 5 = 71%

 

can someone help me to calculate this ???

 

thnx in advance,

Add them all up, then divide each one by the total and *100 to get the percentage.

 

thanx but can you give it like a code because i cant to seem to get it right :(

it will help me to understand where i go wrong :)

 

thnx jessica,

value 1 = 19

value 2 = 33

value 3 = 12

value 4 = 5

value 5 = 129

-----------------------------

total = 198

 

value 1 = (19 / total) * 100 = 9.6%

value 2 = (33 / total) * 100 = X%

value 3 = (12 / total * 100 =

value 4 = .........

value 5 = ..........................

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.