LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
DM DM is offline
external usenet poster
 
Posts: 2
Default VBA function returning multiple values?

Hi,

I need a way to trick a function to return more than one value. Basically I
have a function which works conceptually like this (of course, my function
is more complicated):

================================================== ===
Function My_Function (var1 as Double, var2 as Double, var3 as Double)

(code1)

Calc1=var1*var2
Calc2=var1*var2

(code2)

End Function
================================================== ===

I need a way to "extract" both Calc1 and Calc2 in Excel. One way I was
thinking was to create two functions, but this would be a waste of
resources, since there are a lot of calculations in (code1). One the other
hand, for any updates, there are two functions to change, instead of one.
Any ideas? Thanks.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning multiple values SeanF74 Excel Discussion (Misc queries) 2 December 9th 09 01:33 PM
Returning Multiple values mickn74 Excel Worksheet Functions 3 February 8th 09 04:27 AM
VLOOKUP Function returning multiple values in a separate table CAT Excel Worksheet Functions 8 October 1st 08 02:53 PM
Looking up multiple values and returning one corresponding value Nightrain Excel Worksheet Functions 10 September 2nd 08 03:55 PM
Returning single/multiple values from array function Ryan Poth[_2_] Excel Programming 4 July 16th 03 08:06 AM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"