This was so incredibly helpful. Literally, the first source I've found that was able to make this work for me. Thank you so much!
@599CD Жыл бұрын
You're very welcome!
@ikimawsome11 ай бұрын
This worked like a charm! Saved me hours of work! Thank you!
@599CD11 ай бұрын
You're welcome!
@TeresaPegrim Жыл бұрын
Thank you very much! This video was very helpful. It was my first time with VBA!
@shrs.34482 жыл бұрын
Thank you so much. This is exactly what I was looking for. First time trying VBA - a bit scary but your illustration is illuminating. thank you, thank you, thank you.
@599CD2 жыл бұрын
Welcome welcome welcome. :)
@amaregebrie68342 жыл бұрын
You brighten my day..... Thanks!
@599CD2 жыл бұрын
My pleasure!!
@SwimminWitDaFishies Жыл бұрын
I don't know what I just did, but I did it!!
@mylenekeng1302 Жыл бұрын
Awesome!!! Your so clear in explaining how to do it...thanks for the help!!!!!!! 👍👍👍👍👍
@599CD Жыл бұрын
welcome
Жыл бұрын
Thanks for sharing man! you are awesome because of doing this for everyone, keep being the great guy you are
@599CD Жыл бұрын
I will. Thanks. :)
@paoloporchetti15638 ай бұрын
What a bliss! Thanks
@599CD8 ай бұрын
Okay sure
@ReneB0992 жыл бұрын
Just what I was looking for, thank you 👍
@599CD2 жыл бұрын
Welcome
@sandyjohnson8549 Жыл бұрын
Would this work if I wanted to count all the colors in a row not just 1 color?
@SwImMiNgRuNnEr Жыл бұрын
This helped for sure, but when I changed one of the cells to another color, it didn't update the number automatically. Is there a way to fix that?
@lawrence9713 Жыл бұрын
need this too
@599CD Жыл бұрын
You'd need to refresh the calculations. I'll add it to the list.
@karidely11 ай бұрын
I love this
@599CD9 ай бұрын
Thanks
@fahadkooj7351 Жыл бұрын
I did it! Thanks A lot! :D
@599CD Жыл бұрын
welcome
@rimisosaimoveis43928 ай бұрын
Hello. How and I use this formula with one more criteria? Example: I want to count the color cells when the range A1:A15 as a specific text. Thanks
@leo_k110 ай бұрын
it works quite well but not with conditional formatting if you could fix this for me i,ll be so thankfull my guy
@599CD9 ай бұрын
K
@stephanven2 жыл бұрын
Will this formula work if you need to count the colours from another sheet?
@599CD2 жыл бұрын
Haven't tried it.
@csilva198312 жыл бұрын
Good morning Richard 🙏 ive used one of your youtube videos to ad a module/macro on a spreadsheet and it works great but when i decide to change the text in the target cell i get the #NAME? Error and even if i try to input the formula agian it keeps happening. What am i doing wrong?
@599CD2 жыл бұрын
It's impossible for me to tell what you're doing wrong from here. I'd need to see everything. Just follow the video step by step.
@DwikiOffice Жыл бұрын
Public Function CountByColor(CellRange As Range, TargetCell As Range) Dim TargetColor As Long, Count As Long, C As Range TargetColor = TargetCell.Interior.ColorIndex For Each C In CellRange If C.Interior.ColorIndex = TargetColor Then Count = Count + 1 Next C CountByColor = Count End Function
@599CD Жыл бұрын
Thanks
@GregBurcham-k1t11 ай бұрын
Nice VBA, but if you use conditional formatting to get the colors it doesn't seem to work.
@599CD11 ай бұрын
Thanks
@davidtanner478310 ай бұрын
YES!!!!!!
@599CD9 ай бұрын
Oui!!!!!!!!!!!
@jerrydfowler34802 жыл бұрын
Rick would something like this be possible in Access VBA?
@599CD2 жыл бұрын
Not really... but in Access you really wouldn't change the color of individual cells like you can in Excel. Sure, you can use conditional formatting, but if you wanted to count those records, you could just do a count using whatever your formula you have for the CF in the first place.
@jerrydfowler34802 жыл бұрын
@@599CD as soon as you said that I'm like Duh lol of course you could.
@vasilijeradonjic54392 жыл бұрын
i have made the VBA code similar to this and it also works, but once i change the colour of a certain cell the count doesn't get updated automaticly. Is there any way to solve the problem?
@599CD2 жыл бұрын
I'd have to see what you're doing to tell you for sure.
@vasilijeradonjic54392 жыл бұрын
@@599CD Function GetColorCount(CountRange As Range, CountColor As Range) Dim CountColorValue As Integer Dim TotalCount As Integer CountColorValue = CountColor.Interior.ColorIndex Set rCell = CountRange For Each rCell In CountRange If rCell.Interior.ColorIndex = CountColorValue Then TotalCount = TotalCount + 1 End If Next rCell GetColorCount = TotalCount End Function i used the same criteria for range and coloured cells for colours i need as you did but every time i change a colour form the range to another one i have to enter the formula and press enter to refresh it. Is there any way to make excel to do this automaticlly?
@vasilijeradonjic54392 жыл бұрын
@@599CD it's the same with your code, i just tried it.
@buzassyadam6468 Жыл бұрын
First of all thank you for this!!!! This is really helpful! My question is the same it is not refreshing whenever I change color.
@aasavtamboli79192 жыл бұрын
Sir When i tried using this CountbyColor Formula in Case of Conditional Formatting it Couldn't Count the Formatted Cells
@599CD2 жыл бұрын
OK
@annab43072 жыл бұрын
@@599CD Sir any option how this can work for conditional formatting as well? Thanks.
@Solukus-com2 жыл бұрын
Same issue here, did you find a solution?
@goldenmask66892 жыл бұрын
Thx
@599CD2 жыл бұрын
Wlcm
@sepidehnourian640411 ай бұрын
I did exactly what you showed but I get the #VALUE! error. what could be the issue?
@599CD9 ай бұрын
Well since I can't see your sheet there's no way I can tell you
@95kcal Жыл бұрын
I'm new to this and I followed all instructions but I couldn't get the function to come out.
@599CD Жыл бұрын
Sorry to hear that
@marlegnnecastro83282 жыл бұрын
This formula did not work for me. I have a feeling it’s because the cells I want to count are on a table with conditional formatting. I tried the formula on a separate sheet it worked like a dream. Anyone know how to fix this? TYSMIA
@599CD2 жыл бұрын
That could be
@roxyelling58092 жыл бұрын
This did not work for me? How can I get help?
@599CD2 жыл бұрын
You could post in my Forums: 599cd.com/Forums
@jonstachelrodt Жыл бұрын
This does not seem to work with Conditional Formatting in cells. Bummer :(
@599CD Жыл бұрын
Indeed!
@walkeroglesby6071 Жыл бұрын
Damn I was getting frustrated because I thought I was typing it in wrong… but makes sense it’s not working because I’m using conditional formatting. Any fix or workaround to this?