Forum Discussion
squid2023
Mar 01, 2024Copper Contributor
Custom Function - LET or LAMDA?
I have a custom function to sum based upon interior color of a cell that works. Can this formula be mimicked by using LET or LAMBDA? If so.. how?
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
2 Replies
Sort By