HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to SUM Cells by Color in Excel (Get it to update automatically)

422,182 views October 26, 2019 10:54

Watch on YouTube
ChannelLeila Gharani

Description from the creator

Join 400,000+ professionals in our courses here 👉 link.xelplus.com/yt-d-all-courses

Learn how to write an Excel formula to sum values based on the cell background color.

⬇️Download the workbook here: pages.xelplus.com/sum-color-file

We achieve this with a simple Excel VBA function. The VBA function has two arguments. One is for color and the other the range that needs to be summed. You can use a similar technique to count cells based on color.

We also improve on the VBA code to have the formula results update automatically when a cell color in the range changes. This is done by using the worksheet selection change event for a specific range. We achieve this with the Application.Intersect method.

🔍 What You'll Learn:
- Crafting a custom VBA function for summing values by cell color.
- Simplified approach to VBA programming with hands-on examples.
- How to implement dynamic cell color selection in your custom function.

🛠️ Custom Function Features:
- Ability to sum values based on specified cell background color.
- Two argument implementation: target cell color and range for summing.
- Step-by-step guide to creating and integrating the function in Excel.

💡 Key Takeaways:
- Enhance your Excel projects with dynamic, color-based calculations.
- Gain practical knowledge in VBA, making your data analysis more efficient.
- Discover how to tailor Excel functions to your specific needs.

LINK to Excel VBA Playlist: youtube.com/playlist?list=PLmHVyfmcRKyzmbDy6QoB…

➡️ Join this channel to get access to perks: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/jo…

👕☕ Get the Official XelPlus MERCH: xelplus.creator-spring.com/

🎓 Not sure which of my Excel courses fits best for you? Take the quiz: xelplus.com/course-quiz/

🎥 RESOURCES I recommend: xelplus.com/resources/

🚩Let’s connect on social:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/company/xelplus

Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

#excel #ExcelVBA

About this tutorial

Leila Gharani published this 10:54 video tutorial on October 26, 2019. It has been watched 422,182 times on YouTube.

Category
Education
Duration
10:54
Published
October 26, 2019
Views
422,182
Likes
5,830

Tags

Share

Further reading

  • Sum Cells based on Background Color - Excel Trick exceltrick.com

    Note: This function does not return the color name but it returns the color index which is also a unique value and can be used in our task. Follow the below steps to use the UDF: 1. First of all open your worksheet wher…

  • How to count and sum cells based on background color in Excel? extendoffice.com

    In this method, we will create a named range with the GET.CELL function, get the color code of cells, and then count or sum by the color code easily in Excel. Please do as follows: 1. Click Formulas > Define Name. See s…

  • Sum by Color in Excel | How to Sum by Colors? (2 Useful Methods) wallstreetmojo.com

    The second approach is explained to arrive at the sum of the color cells in excel, as discussed in the below example. Consider the data table to better understand the methodology. Step 1: Now, let us highlight the list…

This tutorial in other languages