Function not evaluated

  • Thread starter Thread starter Srinivas Chundi
  • Start date Start date
S

Srinivas Chundi

I created a simple function in a workbook using tools/macro/vb editor. When
I assign the function to a cell in the worksheet, instead of being evaluated
and returning the value, the function call appears text in the cell. My
function is as follows.

public function GetECSNum(Prefix as String, Number as String) as String
GetECSNum = Prefix & "-" & Number
end function

When I assign the function to a cell as =GetECSNum(A1,B1), instead of
displaying the return value of the function, I see the string
'=GetECSNum(A1,B1)' as it is in the cell. However, I do see the name of the
function in the list of user defined functions. The same function, when used
in a different spreadsheet, displays the correct return value. What am I
missing here?
Thanks for any help
-- Manohar
 
sounds like you entered the formula in a cell formatted as text.
Reformat the cell, then double click to enter edit mode. Hit Enter and
it should evaluate.
 
Back
Top