Hi All,

I have a problem with an excel funtion that i created, i have a series of
defined named range pointing to various cells, however, i cannot seem to call
them out within my procedure. Could anyone please help? It is like something
below:


Function CCY_CALC(PosVal, CCY)

CCYType = CCY

Select Case CCYType
Case "AUD"
' AUD_USD is the defined name which points to a cell with the amount of 1.3

RateD = CCY_CALC * AUD_USD

Case "CAD"
' AUD_USD is the defined name which points to a cell with the amount of 1.01

RateD = CCY_CALC * CAD_USD

End Select


CCY_CALC = RateD

End Function

Thanks in advance
Ray