Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static percentage formula (EXCEL)

Status
Not open for further replies.

paulpeyton

Technical User
May 25, 2003
10
US
How do I write a formula (or is there some other way) to take a static percentage, say 10%, and calculate the number of times that percentage can be taken of a number to ultimately reach a particular threshold.

EX. 10% of 10 is 1
10-1 is 9
10% of 9 is .9
9-.9 is 8.1
10% of 8.1 is .....

to reach a threshold of 8 equals three attempts.

Is there a way to do this in one formula applied to a single cell? What is the formula or function?

Thanks for the assistance!
Paul
 
Hi,

I couldn't find a way to do it on a shpeadsheet.

Here's a User Defined Function. Paste into a MODULE and run like any other function
Code:
Function IterationToThreshhold(Nbr, Threshhold, Percent) As Integer
   i = 1
   r = (1 - Percent) * Nbr
   Do
      i = i + 1
      r = 0.9 * r
   Loop Until r < Threshhold
   IterationToThreshhold = i
End Function


Skip,

[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue]
 
Algebraically, the equation is:
(1-%)^x = 8/10
x=ln(8/10)/ln(1-%)

Since you want to round this value up to find the number of attempts required to drop the bigger number (less serial discounts) below the smaller number, use the formula:
=INT(LN(C1/B1)/LN(1-A1)+0.99999)
A1=% discount
B1=bigger number
C1=smaller number
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top