Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
creating a loop | Excel Discussion (Misc queries) | |||
Creating a loop | Excel Discussion (Misc queries) | |||
For Next Loop Function for Creating New Spread sheets | Excel Programming | |||
Need Help With Creating A Loop | Excel Programming | |||
Creating a loop | Excel Programming |