# 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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

#### vds1

##### Well-known Member
Post Cell B formula

#### SHUTTEHFACE

##### Board Regular
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``````

#### SHUTTEHFACE

##### Board Regular
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``````

#### SHUTTEHFACE

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

Any ideas?

#### SHUTTEHFACE

##### Board Regular
Thoughts? Help!

bump

Replies
6
Views
70
Replies
13
Views
208
Replies
0
Views
124
Replies
1
Views
71
Replies
4
Views
151

### Forum statistics

1,191,608
Messages
5,987,642
Members
440,104
Latest member
thigarette ### 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