exceldude2001
exceldude2001

Reputation: 161

custom function in office script?

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

Answers (1)

Petra
Petra

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

Related Questions