Reputation: 161
In Excel VBA I created the below custom function. Is it possible to replicate that in Excel script?
Function ColorSum(myrange As Range, mycolorindex As Integer) As Double
Dim c As Range
On Error Resume Next
For Each c In myrange.Cells
If c.Interior.ColorIndex = mycolorindex Then _
ColorSum = ColorSum + c.Value
Next
End Function
Upvotes: 2
Views: 2639
Reputation: 426
Currently, you can't create custom functions with Office Scripts. To have this feature request considered in our planning process, you can add the request on our User Voice page.
Thanks - The Office Scripts Team
Upvotes: 3