Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Custom function to return output in multiple cells

I'd like to write a function that returns more than one value, which I'd
like to be displayed in multiple cells. Is it possible? If not, what's the
nearest thing I can do?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom function to return output in multiple cells

Public Function ArrList(rng as Range)
Dim varr as Variant
Dim i as long
varr = rng.Value
for i = lbound(varr,1) to ubound(varr,1)
varr(i,1) = varr(i,1)*i
Next
ArrList = varr
End Function

select cells C1:C10

in the formula bar enter:

=ArrList(C1:C10)
end with Ctrl+Shift+Enter rather than just enter to array enter the formula.

--
Regards,
Tom Ogilvy



"Asif" wrote in message
...
I'd like to write a function that returns more than one value, which I'd
like to be displayed in multiple cells. Is it possible? If not, what's the
nearest thing I can do?




Reply
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
Setting multiple conditions to return a figure from multiple cells Sapper Excel Discussion (Misc queries) 4 April 26th 09 10:33 PM
Function evaluate multiple cells and return 1st one w/a value Dan Shoemaker Excel Discussion (Misc queries) 1 August 27th 06 02:46 AM
auto filter doesn't return cells containing the custom search wor. annelidae Excel Worksheet Functions 2 August 24th 06 02:07 AM
Can a function return a Null (blank ) value? Maybe a custom functi colin_e Excel Worksheet Functions 2 March 16th 06 02:36 PM
formula for custom output TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 November 15th 05 04:36 AM


All times are GMT +1. The time now is 10:25 PM.

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

About Us

"It's about Microsoft Excel"