Function not evaluated

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
 
J

JE McGimpsey

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top