![]() |
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 |
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 |
All times are GMT +1. The time now is 01:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com