Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Array Parameters as Variants Only

thebaje wrote:
Your code snippet works when the array is called within a Sub. I have seen
and tried code snippets from other posts using the same approach you
outlined,but have never been able to get it to work as a worksheet function
call. If the function is used in a cell on an Excel worksheet and the array
values are called from a range on a worksheet, the result is the #VALUE error
message

For example, the values 1,2,3 are in Rows C3:C5 and named ArrIn. When
=DoNothing(ArrIn) or DoNothing(ArrIn()) is entered in Cell D7 , the result is
always #VALUE! .


The above is simply wrong. Perhaps there is something in your code for
DoNothing that causes it. With 1,2,3 in C3:C5, which is named "ArrIn", with
Function DoNothing(whatever) As Integer
DoNothing = Application.Sum(whatever)
End Function

then on the worksheet =DoNothing(ArrIn) returns 6

Alan Beban

Am I missing something?

thebaje

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
Too few parameters Laebrye Excel Discussion (Misc queries) 1 May 26th 09 11:56 AM
SQL & Like Parameters George Applegate[_2_] Excel Discussion (Misc queries) 2 November 2nd 07 06:11 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Too few parameters lou sanderson Excel Discussion (Misc queries) 1 January 13th 06 06:35 PM
templated array as function parameters Steven Deng Excel Programming 2 November 5th 04 05:37 AM


All times are GMT +1. The time now is 06:28 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"