Function SumByColor(CellColor As Range, rRange As Range)
Dim cSum As Long
Dim ColIndex As Integer
ColIndex = CellColor.Interior.ColorIndex
For Each cl In rRange
If cl.Interior.ColorIndex = ColIndex Then
cSum = WorksheetFunction.SUM(cl, cSum)
End If
Next cl
SumByColor = cSum
End Function
how to Subtraction with background color
ReplyDeleteive trying to calculate a duration between time using this method, its failed.. its only works on number, not working for time,..
ReplyDeleteexample:
1) 1 hour 5 min -yellow
2) 1 hour - yellow
3) 30 min - green
can you show me how can i get the value based on date/time?
thanks
Don
Hello
ReplyDeleteVery useful video thanks.
I have use above code but no sum of amount that have decimal , any idea to sum it
ReplyDeleteThanks for the code, it's very helpful.
ReplyDeleteThank you very much. Very clever and useful. Well done.
ReplyDeleteWHY IS IT ROUNDING OFF MY FIGURES
ReplyDeletewhy decimal not displayed???
ReplyDeletevery useful. thanks!
ReplyDeleteIt´s really helpful. THANKS
ReplyDeleteWhen I reopen the file and update, its showing #NAME? instead of figger. Can you fix this please?
ReplyDeletethanks Dear.. really its work ..
ReplyDeleteHi it's very useful and helpful Thanks.
ReplyDeleteBut it's not sum if there's decimal means 0.5 or 1.5 Please give some ideas or update the codes for that
Thanks for this great work
You are the great men
ReplyDelete