LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Returning range object from custom functions

Can anyone tell me how to return range objects from custom functions?

The idea is this :=

If we were to use the built-in Excel function sum like "=sum(e4)", it
will return the value contained in the cell e4. No problem there!
However, if we were to use a function like "sum(address(5,4)), it
returns an error.

My interpretation to this is that the built-in Excel function
"address()" returns the address as a string and not a range object and
the built-in Excel function sum() requires a range object to be passed
as an argument to it. To overcome this limitation, my intention is to
be able to write a custom function whereby I can return a range object.
If I were to be able to do that, then the above problem could be
addressed like so :=

"=sum(myFunc(single cell range passed as argument for simplicity))" -
presume that my custom function myFunc returns the range object!

This function may seem useless at the moment but this is just the
starting point to what I eventually want to do, which I can explain if
someone really want to know but as such is not required to provide a
solution to my query.

Best regards


Deepak Agarwal


---
Message posted from http://www.ExcelForum.com/

 
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
Access closed workbook range in Custom functions agarwaldvk[_5_] Excel Programming 6 July 9th 04 09:33 AM
Access closed workbook range in Custom functions agarwaldvk[_4_] Excel Programming 1 July 8th 04 03:50 AM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 06:01 PM.

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"