Sum Cells Based on Their Color in Excel (Formula & VBA)

Sum Cells Based on Their Color in Excel (Formula & VBA)

TrumpExcel

2 года назад

126,392 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@poliisinpoika
@poliisinpoika - 20.11.2023 13:47

If you are facing the VALUE error to fix this click the FX logo next to the formula bar and define the formula from there. Mine did not calculate with comma but it did with doubledot comma.

Ответить
@saph39
@saph39 - 25.10.2023 00:48

I just found this video and it is AWESOME! I subscribed. Your explanations are clear and concise. Thank you so much for sharing the coding. I have one question: everything is working except when I enter numbers that have decimals, the formula section is rounding it up/down to a whole number. For instance 3.25 is rounded down in the sum cell to 3.00, but I want it to show the actual 3.25. I have tried just about everything to fix this. What am I missing?

Ответить
@nancylopez1708
@nancylopez1708 - 13.10.2023 18:13

Thank You!!! Very easy step by step explanation. Love it!!

Ответить
@riosafutra7773
@riosafutra7773 - 13.10.2023 09:32

Thank you it works in self-coloring cell. But it doesn't works in conditional formatting cell. Do you have any suggestion?

Ответить
@Kropus13
@Kropus13 - 12.10.2023 16:27

HI,
I can't seem to find option for filter by column. I'm using sharepoint. Is there any way to do it?

Ответить
@OriginalKaramelKing
@OriginalKaramelKing - 06.10.2023 17:33

Thanks bro!

Ответить
@BLUE14BFB_IHATEBFBEDITS
@BLUE14BFB_IHATEBFBEDITS - 26.09.2023 17:42

Thank you , useful video. Summation comes as whole number (rounded). How to change the format to Decimals?

Ответить
@delta_magoo709
@delta_magoo709 - 15.09.2023 17:22

Thank you - very clear and exactly what I was looking for. I wish I'd seen this long ago. You are a very good instructor! Subscribed. I needed the result to two decimal places so used Double instead of Integer and Long. Thanks to those suggestions to others below!

Ответить
@ianpengilley5160
@ianpengilley5160 - 14.09.2023 07:46

Wonderful video - thank you Sumit!

Ответить
@ileanamartinez3265
@ileanamartinez3265 - 07.09.2023 02:39

Thank you! This works, I used the VBA for the first time thanks to you :)

Ответить
@aliyahcurves3101
@aliyahcurves3101 - 04.09.2023 22:55

thanks alot but it dont add decimals for me

Ответить
@jq8706
@jq8706 - 28.08.2023 01:43

Great video. When I press F9 the formula doesn’t refresh.

Ответить
@markdowell5778
@markdowell5778 - 16.08.2023 12:15

Brilliant - thank-you!

Ответить
@wyograd03
@wyograd03 - 11.08.2023 03:13

This was a great video and very helpful! Got exactly what I needed to get done using your method! Just earned a subscriber.

Ответить
@RepZap
@RepZap - 06.08.2023 17:37

Just returning a value of 0. Not calculating. Please help anyone that had the same problem.

Ответить
@sofimr
@sofimr - 07.06.2023 22:36

What if I just want to count how many cells of a certain colour there are within a range?

Ответить
@Nikki-sm7qg
@Nikki-sm7qg - 24.05.2023 23:40

I love the video and all your help with excel. How do I get this to add up decimals? It keeps rounding everything up or ignoring if its too low to round.

Ответить
@zahidah321
@zahidah321 - 11.05.2023 12:37

For the 3rd method, may I know why is the formula has no.38 specifically? The one =Get.Cell(38,B2)

Ответить
@user-qw5ud1wq3t
@user-qw5ud1wq3t - 05.05.2023 18:11

Thank you so much! This made my day! I love excel and what you can do with it!

Ответить
@andrewscoins5013
@andrewscoins5013 - 17.04.2023 14:26

This is really an ingenious tool. But I have a little problem with the code. When I use this code rounds to whole euros for example When the sum should actually be 62.18 €, the result in the spreadsheet is 63.00 what is the reason can you help me?

Ответить
@esperanzanitao8118
@esperanzanitao8118 - 06.04.2023 21:28

Your SumByColor formula is a life saver! thank you so much for sharing!

Ответить
@albertmnic
@albertmnic - 29.03.2023 17:27

Thank you! I followed your explanation and it worked! However, as you said it’s necessary to press F9 to force recalculate. Is it possible to also automate the forced recalculation?

Ответить
@sarahpom7771
@sarahpom7771 - 09.03.2023 22:04

thank you, this VBA code is amazing, i am trying to use the same code to do a 'counta' instead of sum of range of colored cells. Can you advise how to do that please?

Ответить
@dan-jq1bw
@dan-jq1bw - 03.03.2023 00:36

How do you add numbers with a decimal and keep the decimal when you add with the colored cell?

Ответить
@lost0415
@lost0415 - 16.02.2023 14:27

Thanks a lot for the sharing!

Ответить
@isuruhettiarachchi9577
@isuruhettiarachchi9577 - 11.02.2023 22:14

Thanks.very helpful 😀

Ответить
@saikiau2
@saikiau2 - 26.12.2022 08:53

why 38 ?

Ответить
@rouellanchesr.4248
@rouellanchesr.4248 - 05.12.2022 21:55

Thank you so much for sharing and your generosity!

Ответить
@pungskalle
@pungskalle - 21.11.2022 14:08

Dont Work, get error when Use function.

Ответить
@nagarjunsagara7971
@nagarjunsagara7971 - 19.11.2022 14:48

I'm using the same VBA code but value shows as zero ,
It doesn't sum up by color, can you please suggest.

Ответить
@alializadeh8195
@alializadeh8195 - 10.11.2022 04:13

Thanx

Ответить
@sakislivanos7739
@sakislivanos7739 - 12.10.2022 05:02

Very good indeed!
Many thanks for elevating our skills sir!

Ответить
@rahulbakshi285
@rahulbakshi285 - 08.10.2022 08:08

Very informative. Will you pls make a vedio on array used in Dictionary. If you already have pls share the link. Thanks

Ответить
@stuartl3367
@stuartl3367 - 05.10.2022 14:22

How can the function sumbycolor be more dynamic so that if you change the background color it re calculates the new range?

Ответить
@NehaGahlot
@NehaGahlot - 25.09.2022 16:05

Your video was a huge lifesaver!! 🌟🌟 Made my research task much simpler and efficient 🥺 Although I don't understand why VBA wasn't working/able to sum few of different shaded cells and i ultimately had to copy the sums of those columns, would like to know this, if you have any idea.

Ps. Saving this video for future use!!

Ответить
@mihapremrl1384
@mihapremrl1384 - 23.09.2022 16:50

Thats so usefull, thanks man!

Ответить
@anbu4980
@anbu4980 - 16.09.2022 11:27

Thank you much sir. Have a great day!

Ответить
@222AGR
@222AGR - 14.09.2022 17:21

This is truly incredible, thank you! I'm curious as I've put my vba into my document, it's not counting the cells that have conditional formatting coloring, only if it's original to the cell. Any idea how I can update my VBA code to count the cells with conditional formatting?

When I just try to pull what the color index for one of those cells with conditional formatting is, it comes back as -4142 regardless of what color it is.

Ответить
@aece_aeceae4982
@aece_aeceae4982 - 13.09.2022 06:52

thnks dude...but how about if those filled color into cell was already done by conditional formatting???i try to code it after conditional formatting (finding the least value and fill the least value with color and leave the greater value as with no color)but it does not recognized the conditional formatting i've done into data i need to manually fill it again before it recognized the cell value..
here is my formula
conditional formatting =I18=MIN($I18:$M18) it will fill the cell having the lowest value
this was my vba code:
Function Sumbycolor(myRange As Range)

For Each myCell In myRange
If myCell.interior.color Then
mySum = mySum + myCell.Value
End If
Next

Sumbycolor = mySum

End Function

it shows no value or zero (0)
thanks in advance

Ответить
@ianrowland7101
@ianrowland7101 - 23.08.2022 12:24

This is great thanks very much, one question this doesn't seem to work for cells that are coloured by conditional formatting do you have a solution for this.

Ответить
@aminulluddinmansor5387
@aminulluddinmansor5387 - 23.08.2022 07:01

if in a decimal place 0.5 can't count.

Ответить
@ashokanselliah9571
@ashokanselliah9571 - 13.08.2022 14:02

Excellent lesson, thank you so much

Ответить
@rsrrai6475
@rsrrai6475 - 02.08.2022 16:51

Hi; Need some help with a formula; Can you help or direct me to the video that yo may have set up Regards Rav

Ответить
@aaronlindsay7488
@aaronlindsay7488 - 23.07.2022 03:20

Nice video

Ответить
@vizzini2510
@vizzini2510 - 03.07.2022 19:29

Why does nobody use the built-in InteriorColor function? If you enter =InteriorColor(B2), Excel will provide a numeric value for the color in cell B2. You can then use that value to write any formula. I often use an IF formula to copy only cells of a certain color: =IF(InteriorColor(B2)=InteriorColor(F35),F35,"")

Ответить
@shaniharris-rotohiko1223
@shaniharris-rotohiko1223 - 01.07.2022 06:15

This was great! Exactly what I was after.

The figures i'm working with include decimals, I was just wondering what I can do to stop the totals from rounding to .00?

Ответить
@eminevrankaya3071
@eminevrankaya3071 - 13.06.2022 18:43

Thx a lot for your work but I cold not get it to run in MacBook. Any suggestions?

Ответить