My current custom function is:
Function GetValue(ByVal str As String) As String
With CreateObject("Scripting.Dictionary")
.Add "A", "Apples"
.Add "B", "Bananas"
If .exists(str) Then GetValue = .Item(str)
End With
In this function, if I put "=GetValue(B1)" in A1 and B1 is A, then I get Apples.
In a new function, I would like a value of A in B1, to return a value of .7.
In a new function, I would like a value of B in B1, to return a value of .9.
Function GetValue(ByVal str As String) As String
With CreateObject("Scripting.Dictionary")
.Add "A", "Apples"
.Add "B", "Bananas"
If .exists(str) Then GetValue = .Item(str)
End With
In this function, if I put "=GetValue(B1)" in A1 and B1 is A, then I get Apples.
In a new function, I would like a value of A in B1, to return a value of .7.
In a new function, I would like a value of B in B1, to return a value of .9.