PC Review


Reply
Thread Tools Rate Thread

creating a function with a for loop

 
 
creating a function with a for loop
Guest
Posts: n/a
 
      12th Aug 2008
Could you please tell me how to create a compound function with a for loop?

The function is SCP!B4=sum{(from MCDcsillag!B4 to MCDcsillag!B13)*sum[(from
XDF!B4 to XDF!B11)*(from RDF!B4 to RDF!B11)*(from XFP!B4 to XFP!I4)*(from
RFP!B4 to RFP!I4)]}

this should be defined in VB.

Thanks in advance.

Sophie
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      12th Aug 2008
Not sure if this is what you are asking for


Cal with
=MyTotal(A1:C1,A3:C3)

Function MyTotal(ParamArray target() As Variant)

MyTotal = 0
For MyRange = 0 To UBound(target)
For Each cell In target(MyRange)
MyTotal = MyTotal + cell.Value
Next cell
Next MyRange
End Function

"creating a function with a for loop" wrote:

> Could you please tell me how to create a compound function with a for loop?
>
> The function is SCP!B4=sum{(from MCDcsillag!B4 to MCDcsillag!B13)*sum[(from
> XDF!B4 to XDF!B11)*(from RDF!B4 to RDF!B11)*(from XFP!B4 to XFP!I4)*(from
> RFP!B4 to RFP!I4)]}
>
> this should be defined in VB.
>
> Thanks in advance.
>
> Sophie

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with creating a loop Woodi2 Microsoft Excel Setup 0 19th Apr 2009 08:56 PM
For Next Loop Function for Creating New Spread sheets Premanand Sethuraman Microsoft Excel Programming 2 24th Jul 2008 05:12 AM
Creating a loop Jennifer Microsoft Excel Programming 11 6th Apr 2008 02:02 AM
Loop Function unable to loop =?Utf-8?B?SnVuaW9yNzI4?= Microsoft Excel Programming 1 28th Jul 2005 10:23 AM
Convert loop with Match function to avoid nested loop??? Kobayashi Microsoft Excel Programming 2 17th Mar 2004 06:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:50 PM.