• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Percentage

shivapavan

New Member
Is there any formula to calculate percentage of the number with out using mathematical functions ?


ex:- i have a number in A1 cell 90 , now i want 50 % of the num 90 = 45 ( 90/2 ) similarly 75 % , 85 % of the num with out mathematical functions, i want the formula to calculate the percentage of the number (ex- = "sum(a1+b1)").
 
Hi shivapavan,


Welcome to the fourms!!


If you want percentage in some other cell, simply multiply the A1 with %age value.

[pre]
Code:
A1*0.75
[/pre]
Is it this you are looking for??


Regards
 
Hi Faseeh,


Thanks for the reply on my first question.I knew the above mentioned function (A1*0.75) , i want a formula to calculate the percentage of the number with any mathematical operations like *,/ ,+.- or () etc etc. I want a formula like =sum(A1+B1) , =sumif(),=percentagerank() etc . now i want a formula to calculate 50% of 90 without any maths operations .


Thanks and Regards

shivapavan
 
What the hell?

Ah I see. You want a FUNCTION that will give you a percentage. You don't want to use the math operators such as +*-.


Hopefully one of the members of knows VBA can make you a User defined function. Which is basically a custom function
 
Shivapavan,


You could just write your own function. To do this open the VBA editor (alt+f11) and go to insert -> module. Then paste the following:

[pre]
Code:
Function percentage(amount As Integer, perc As Integer)

percentage = (amount * perc) / 100

End Function
[/pre]

Then while in excel you can do =percentage(90,50) and this would result in 45.


There is no way to do this without math somewhere along the lines, but this way you only have to do math when creating your formula, then you can use it over and over!


It doesnt seem to work for super high numbers, who knows why, but you can use this as a reference to figure out how to modify it any way you need.
 
I hope its the rarest formula ever used.. LOL


=PRODUCT(A1,50%)


BTW.. I have not used any arithmetical operator..
 
Hi robz228,


If you check Help on Dim integer then you will find:

Integer variables are stored as 16-bit (2-byte) numbers ranging in value from -32,768 to 32,767.

So change the UDF like:

[pre]
Code:
Function percentage(amount As Long, perc As Integer)
percentage = (amount * perc) / 100
End Function
[/pre]
 
@Debraj roy this is what exactly i need.thanks for the solution .


@robz228 thank u


@shrivallabha thank u


@Montrey Special thanks
 
Back
Top