Notifications
Clear all
Topic starter
Hi Every one !
Possible to update formula based on color identification.
Posted : 04/10/2022 12:13 am
You need a User Defined Function for this in VBA. I found a piece of code in a collection of old files that works provided that you color the cell with the total the same as the colors in the sum range.
The code is as follows:
Function SumColor(rngCol As Range)
Application.Volatile
Dim C As Long Dim Total As Variant
C = Application.ThisCell.Interior.Color
Total = 0
For Each
Cell In rngCol
If Cell.Interior.Color = C Then
Total = Total + Cell.Value
End If
Next
SumColor = Total
End Function
See attached file using this function.
Posted : 04/10/2022 1:06 am
Hi Saliha,
Check out this post, it may be useful for you
Count, Sum and Average Colored Cells
Regards
Phil
Posted : 04/10/2022 1:33 am
Topic starter
Hi Riny van
thanks its working fine.
Regards/Saliha
Posted : 08/10/2022 12:48 am