Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

me
Lv 7
me asked in Computers & InternetSoftware · 7 years ago

why doesn't this excel function work?

i am trying to figure out how to write functions in excel. why does this one return a value error:

function myfun()

myfun = 1

end function

1 Answer

Relevance
  • BT_Bot
    Lv 5
    7 years ago

    You have to specify the variable type for the return value in your function declaration:

    function myfun() As Integer

    ... As Single

    ... As Double

    ... As String

    ... As Boolean (this will return TRUE)

Still have questions? Get your answers by asking now.