Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
All articles VBA How to return value from a function in Excel using VBA – Excelchat

How to return value from a function in Excel using VBA – Excelchat

In Excel VBA, we can use function when we are performing repetitive tasks like data formatting, calculations and so on. With Excel VBA, we can create a function that returns a value when the function is used. This article looks at how to return a value from a function using VBA Excel.

Figure 1: Return value function with VBA

Return a value using exit function or End function

When conducting a function procedure, you need to assign a value to the procedure’s name. After you have assigned the name, you will have the value that was most recently assigned to the procedure returned when an Exit or End function is executed.

Note that with VBA, we can have more than one Exit function statement as well as mix Return and Exit function statement in same procedure.

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc