How to SUM cells based on cell color in Excel - SUM by fill color

  Рет қаралды 272

Excel Bootcamp

Excel Bootcamp

Күн бұрын

In this tutorial, you will learn how to sum cells by fill color.
⚡Download: excelkid.com/wp-content/uploa...
⚡More Excel tips:
excelkid.com/
The most important rule is that Excel does not have a built-in function for cell operations based on color. The object model controls cell formatting and is inaccessible through standard functions. You can use the SUMBYCOLOR function to get the result quickly. Add the first argument, which is the cell color. After that, select the range you want to summarize.
Chapters:
00:00 Intro
00:05 How to sum cells by fill color?
#excel #exceltips #exceltutorial #vba

Пікірлер: 3
@joefromdc
@joefromdc 28 күн бұрын
Thanks for the video but it would have been nice if u went through some of the code within the video.
@excelkid
@excelkid 28 күн бұрын
Hello, thank you for your comment! I considered going into the code analysis, but ultimately decided on the shorter version because 90% of the viewers are only interested in the final solution (not so much in how the code exactly works). I'll upload a version here that explains how the function works. Explanation of the Function: Function SUMBYCOLOR(color As Range, ParamArray ranges() As Variant) As Double ' Declare variables to be used within the function Dim cell As Range Dim targetRange As Variant Dim sumResult As Double ' Initialize the sum result to 0 sumResult = 0 ' Loop through each target range in the ParamArray ranges For Each targetRange In ranges ' Check if the current item in ranges is of type "Range" If TypeName(targetRange) = "Range" Then ' Loop through each cell in the current target range For Each cell In targetRange ' Check if the background color of the current cell matches the reference color If cell.Interior.color = color.Interior.color Then ' If the colors match, add the cell's value to sumResult sumResult = sumResult + cell.Value End If Next cell End If Next targetRange ' Assign the final sumResult to the function's return value SUMBYCOLOR = sumResult End Function
@joefromdc
@joefromdc 28 күн бұрын
@@excelkid thanks for the reply. VBA code correct
How to Sum Cells by Color in Excel (Get it to update automatically)
10:54
Next level FILTER Function tricks | Excel Off The Grid
13:23
Excel Off The Grid
Рет қаралды 15 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 58 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 24 МЛН
No empty
00:35
Mamasoboliha
Рет қаралды 10 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 64 МЛН
Uncover Hidden Excel Powers: Sum & Count Cells by Color!
9:36
Master the IF Formula in Excel (Beginner to Pro)
11:16
Kenji Explains
Рет қаралды 410 М.
How to SUM or COUNT Cells by Color in Excel and update automatically
23:53
Watch Learn Grow Repeat
Рет қаралды 12 М.
Using dynamic arrays in a Table : 4 methods | Excel Off The Grid
8:07
Excel Off The Grid
Рет қаралды 9 М.
IF AND OR Formula in Excel with MULTIPLE CONDITIONS
17:32
Presentation Mastery
Рет қаралды 632 М.
How To Count Colors with an Excel Function | Count Colored Cells
4:56
10 Years of VBA Array Knowledge in 40 Mins
41:57
Excel Macro Mastery
Рет қаралды 15 М.
SUM and COUNT by Cell Colour in Excel -- WITHOUT VBA!
16:32
CELLMATES
Рет қаралды 74 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 58 МЛН