Intereting Posts

Counterexample of polynomials in infinite dimensional Banach spaces
What are the rules for complex-component vectors and why?
When the product of dice rolls yields a square
Proof that $Γ'(1) = -γ$?
How to compute intersection multiplicity?
Prisoners Problem
Is homology with coefficients in a field isomorphic to cohomology?
Applications of the Fibonacci sequence
Proving that any rational number can be represented as the sum of the cubes of three rational numbers
$H^{-1}(\Omega)$ given an inner product involving inverse Laplacian, explanation required
Locally connected and compact Hausdorff space invariant of continuous mappings
Analytical continuation of complete elliptic integral of the first kind
Solutions to $\binom{n}{5} = 2 \binom{m}{5}$
Convex metric on a continuum.
Find two elements that don't have a gcd in a subring of Gaussian integers

So pardon if this is a simple question…

I have a slider that returns a value in a given range, so:

```
min: 174
max: 424
slider current value: 230
```

I want to treat my `min`

value as 0% and my `max`

value as 100%. What formula can I use to calculate the percentage for my slider in this given range?

- Trick with 3-digit numbers, always get 1089
- Proving that for reals $a,b,c$, $(a + b + c)^2 \leq 3(a^2+b^2+c^2)$
- Maximum Value of Trig Expression
- Find the centre of a circle passing through a known point and tangential to two known lines
- Does this equality hold: $\frac{\sqrt{2|x|-x^2}-0}x = \sqrt{\pm\frac2x-1}$?
- $4494410$ and friends

- $n$-tuples of points of $\mathbb{C}$, identification.
- Can a cubic equation have three complex roots?
- Evaluate $ \displaystyle \lim_{x\to 0}\frac {(\cos(x))^{\sin(x)} - \sqrt{1 - x^3}}{x^6}$
- Zero to the zero power - is $0^0=1$?
- Prove that $\sin x+2x\ge\frac{3x(x+1)}{\pi}$ for all $x\in $
- Finding the equation of the normal line
- Determining the number $N$
- Solve $3^y=y^3,\space y\neq1,\space y\neq3$
- Simplifying this (perhaps) real expression containing roots of unity
- How many ways to arrange the flags?

$$

\frac{{n – 174}}{{424 – 174}} \times 100.

$$

In your example, $n=230$.

The full range is from $174$ to $424$. The distance between these is $424-174$, which is $250$.

The current value of the slider is $230$.This is $230-174$, that is, $56$ larger than the minimum possible value.

We are interested in the ratio $56/250$. A calculator shows that $56/250=0.224$.

We want to express $0.224$ as a percentage. To do that, we multiply $0.224$ by $100$. The result is $22.4$. So the required percentage setting for $230$ is $22.4\%$.

Since we will not always be dealing with the setting $230$, let’s generalize a little. Suppose that the slider setting is $S$. (In your question, $S=230$.)

Assume that $174 \le S \le 424$.

Then the distance from $S$ to the minimum $174$ is

$$S-174.$$

The ratio of this distance to the full distance $474-174$ is

$$\frac{S-174}{424-174}.$$

To turn this into a percentage, multiply by $100$.

The answer is

$$\left(\frac{S-174}{424-174}\right)\times 100 \:\:\%.$$

**Reality check**: It is quite easy to make mistakes, I have done it hundreds of times. So let’s see what answer we get from the above formula when $S=174$. Substitute $174$ for $S$. We get $0\%$. Good. Let’s see what answer we get if we put $S=424$. Substitute. We get $100\%$. In general, spot checks of this kind do not *guarantee* that a formula is correct, but they are good evidence that we have not made a horrible blunder. (In *linear* cases, such as this one, two spot checks in fact *do* guarantee correctness.)

Now let us adjust the formula so that we can deal with a different situation, where the minimum setting is $m$ and the maximum setting is $M$. Let $m\le S \le M$. Then the percentage that corresponds to the setting $S$ is given by

$$\left(\frac{S-m}{M-m}\right)\times 100 \:\:\%.$$

The reasoning that gives this formula is exactly the same as the one we used for the concrete numbers you supplied.

Now that we have a formula that gives the percentage $P$ when we know the setting $S$, we can use a little algebra to get a formula that gives the setting $S$ if we are told the desired percentage $P$. If you have need of such a formula, and have difficulty deriving it, please leave a message.

Wow, thank you, I tried to work this out for quite a while.

$B_2=MAX$

$A_1=MIN$

$D_1=\dfrac{B_2-A_1}{A_2-A_1}~$ — This is the result of your formula.

`E1 = IF (D1 < 50%, -(1-2*D1), ABS(1-2*D1))`

Using this I can use the above in *Excel* to get the exact $50\%$ as $0,$ and anything lower or higher generates a positive or negative $\%$ leading to the min or max numbers.

Using your numbers in your example

$$\begin{align}

299 &= 0\%\\

174 &= -100\%\\

424 &= 100\%

\end{align}$$

Hope this helps someone else.

- Does negative distributive property of convolution over cross correlation holds?
- Discrete logarithm – strange polynomials
- Prove that if $E(X\log X)<\infty$ then $E(\sup_n |S_n|/n)<\infty$.
- Immersion $\mathbb{S}^n\times\mathbb{R}\to\mathbb{R}^{n+1}$
- Why an eigenspace is a linear subspace, if the zero vector is not an eigenvector?
- Solving $f(x+y) = f(x)f(y)f(xy)$
- Infinitely many primes of the form $4n+3$
- Can compact sets completey determine a topology?
- Help solving $ax^2+by^2+cz^2+dxy+exz+fzy=0$ where $(x_0,y_0,z_0)$ is a known integral solution
- Isomorphism of quaternions with a matrix ring over real numbers
- How can a subfield of an abelian extension fail to be cyclic when subjected to a norm-like condition. (How can I understand the supplied explanation)
- $x_{n+m}\le \frac{x_n+x_{n+1}+\cdots+x_{n+m-1}}{m}$. Prove that this sequence has a limit.
- give a counterexample of monoid
- Exponential growth of cow populations in Minecraft
- Convergence in probability inverse of random variable