View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Keith Keith is offline
external usenet poster
 
Posts: 262
Default problem returning a range from a function

Hi,
It has been years that Ive been looking for the following, and Im still
looking.
I have a function that will be used in a spreadsheet. I want to have one
range (Range1) be the input range, with the result provided in a second range
(Range2). The function call would be this€¦.

Public function MyRangesFunction (Range1 as range, Range2 as range)

Some code here


MyRangesFunction = some_value (wish it could be a specified range)

End function


The only way Ive been able to do this is via a subroutine and some fancy
coding that speaks directly to the active sheet, etc.

Is there any way that I can easily return a range from a function?

Thank you,

Keith