Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default creating a function with a for loop

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default creating a function with a for loop

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
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
creating a loop JakeShipley2008 Excel Discussion (Misc queries) 2 September 9th 08 02:17 PM
Creating a loop JakeShipley2008 Excel Discussion (Misc queries) 1 September 8th 08 10:26 PM
For Next Loop Function for Creating New Spread sheets Premanand Sethuraman Excel Programming 2 July 24th 08 05:12 AM
Need Help With Creating A Loop zero635[_8_] Excel Programming 3 October 29th 05 08:58 PM
Creating a loop Ibuprofen Excel Programming 1 October 26th 05 04:41 AM


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