Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can a function return two values?
Is it possible for a function to return two values to be
used in another function? Suppose I need a function "ff" to calculate two variables called "station" and "offset". Is it possible to return both these variables to be used in another function called "elevation(station, offset)"? A very rough algorithm follows - Function GE() 'This is the main function Dim a as long Call ff(a) GE = elevation(station, offset) End Function Function ff( var as long) 'Returns station and offset to the main function station = a +1 offset = a^2+1 'How do I return both station and offset? ?? End Function Function elevation (station as long, offset as long) elevation = station + offset (for simplicity) End Function THANKS IN ADVANCE. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Address function to return values from min row | Excel Discussion (Misc queries) | |||
IF Function with multiple return values | Excel Worksheet Functions | |||
A Function to Return Top 5 Values Only | Excel Worksheet Functions | |||
How can I use the vlookup function to return a sum of the values? | Excel Discussion (Misc queries) | |||
vlookup function return all values | Excel Worksheet Functions |