About 625,000 results
Open links in new tab
  1. How to return a result from a VBA function - Stack Overflow

    When called within VBA the function will return a range object, but when called from a worksheet it will return just the value, so set test = Range("A1") is exactly equivalent to test = …

  2. Function statement (VBA) | Microsoft Learn

    Mar 30, 2022 · See the Call statement for specific information about how to call Function procedures. To return a value from a function, assign the value to the function name. Any …

  3. How to Return a Value in VBA Function (Both Array and Non

    Nov 11, 2025 · In this article, I’ll show you how you can return a value from a User-Defined Function in VBA in Excel. I’ll show you how to return an array value, a non-array value, and …

  4. How to Return a Value from VBA Function (With Examples)

    Apr 12, 2023 · This tutorial explains how to return a value from a function in VBA, including several examples.

  5. How to Return Values from a Sub in Excel VBA (4 Methods)

    Oct 27, 2025 · In this quick tutorial, we have learnt how Excel VBA returns a value using four different effective methods. Feel free to download our sample workbook and try these methods …

  6. How To Easily Return A Value From A VBA Function

    Nov 19, 2025 · The fundamental method for a VBA function to successfully return a value involves equating the function’s name with the calculated result within the function body.

  7. VBA Return Function - Syntax, Examples, How to Use GoSub?

    A guide to VBA Return. Here we learn what is GoSub Return statement in Excel VBA, how to use it, with examples & downloadable excel template.

  8. How to return a result from VBA function? - Simple Excel VBA

    Jun 12, 2021 · In VBA there is no Return statement like in other languages. In this article I'm going to show You how to return a result from VBA function.

  9. Excel VBA Function Tutorial: Return, Call, Examples - Guru99

    Jul 15, 2024 · Suppose you are developing a program that calculates interest on a loan. You can create a function that accepts the loan amount and the payback period. The function can then …

  10. Need to return value from a function in vba - Stack Overflow

    Jul 10, 2017 · You need to have code in the function that sets a value to the name of the function - the return value. I am trying to return a value from a function but is not happening. Public sub …