# Value for which cell = x

#### SHUTTEHFACE

##### Board Regular
Hello!

I'm running into some circular logic that is making my eyes spin. I have cells A & B. Cell B contains a formula which uses A as an input. My question is: I want a cell that gives me the value B for which cell A = X (a certain value, let's say 100%).

Any thoughts?

Thanks!

M

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Post Cell B formula

It uses visual basic:
=ErlangCsrv(D3,H3,E3,G3), where D3 is the value I am trying to find that will make this formula = 100%

CODE:

Code:
``````' Returns the probability a call waits.
' m is the agent count
' u is the traffic intensity
' tt is the target wait time
' tc is the average call time
Public Function ErlangCsrv(ByVal m As Integer, ByVal u As Double, ByVal tc As Double, ByVal tt As Double) As Double
ErlangCsrv = 1 - ErlangC(m, u) * Math.Exp(-(m - u) * (tt / tc))
End Function

' Returns the probability a call waits.
' m is the agent count
' u is the traffic intensity
Public Function ErlangC(ByVal m As Integer, ByVal u As Double) As Double
d = PowerFact(m, u)
s = 1
For k = 1 To m - 1
s = s + PowerFact(k, u)
Next k
' ErlangC = s
ErlangC = d / (d + (1 - u / m) * s)
End Function``````

Entire Code:

Code:
``````' By Joannes Vermorel, 2008-05-04' Copyright (c) 2008, LOKAD SAS

' Returns the probability a call waits.
' m is the agent count
' u is the traffic intensity
Public Function ErlangC(ByVal m As Integer, ByVal u As Double) As Double
d = PowerFact(m, u)
s = 1
For k = 1 To m - 1
s = s + PowerFact(k, u)
Next k
' ErlangC = s
ErlangC = d / (d + (1 - u / m) * s)
End Function

' Return Power(u, k) / Factorial(k) in a numeric-safe manner.
Public Function PowerFact(ByVal m As Integer, ByVal x As Double) As Double
s = 0
For k = 1 To m
s = s + Math.Log(x / k)
Next k
PowerFact = Math.Exp(s)
End Function

' Returns the probability a call waits.
' m is the agent count
' u is the traffic intensity
' tt is the target wait time
' tc is the average call time
Public Function ErlangCsrv(ByVal m As Integer, ByVal u As Double, ByVal tc As Double, ByVal tt As Double) As Double
ErlangCsrv = 1 - ErlangC(m, u) * Math.Exp(-(m - u) * (tt / tc))
End Function

' Returns the average speed of answer (ASA)
' m is the agent counts.
' u is the traffic intensity
' tc is the average call time
Public Function ASA(ByVal m As Integer, ByVal u As Double, ByVal tc As Double) As Double
ASA = ErlangC(m, u) * tc / (m - u)
End Function``````

Looking to solve for the value m which gives ErlangCsrv = 95%

Any ideas?

Thoughts?

Help!

bump

Replies
3
Views
493
Replies
2
Views
222
Replies
4
Views
60
Replies
5
Views
125
Replies
1
Views
217

1,219,569
Messages
6,149,040
Members
450,853
Latest member
xtiinctt

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back