Тёмный
No video :(

Create a Count of Coloured cells in Conditionally formatted sheets 

Barb Henderson
Подписаться 37 тыс.
Просмотров 45 тыс.
50% 1

Create a Count of Coloured cells in Conditionally formatted sheets
Count the number of each colour Of cells. Use a function to count colours. The condition created by using a formula for the colour. Check out my online courses www.easyexcelanswers.com/courses.html
All my courses include online support and a user manual
Let me teach you the VBA that I have learn in my five years of consulting
www.easyexcela...
Let's take the frustration out of user forms
www.easyexcela...
Become an Affiliate and earn 25% on Course Sales
barb-s-school-...
Code
Function COUNTConditionColorCells(CellsRange As Range, ColorRng As Range)
'make the worksheet always update
Application.Volatile
'define my variables
Dim Work As Boolean
Dim dbw As String
Dim CFCELL As Range
Dim CF1 As Single
Dim CF2 As Double
Dim CF3 As Long
Work = False
'for the first conditional format to the number of conditions in the range
For CF1 = 1 To CellsRange.FormatConditions.Count
'if the first condition colour is in the range then start counting
If CellsRange.FormatConditions(CF1).Interior.ColorIndex = ColorRng.Interior.ColorIndex Then
Work = True
Exit For
End If
Next CF1
CF2 = 0
CF3 = 0
If Work = True Then
For Each CFCELL In CellsRange
'count the colours in the range
dbw = CFCELL.FormatConditions(CF1).Formula1
dbw = Application.ConvertFormula(dbw, xlA1, xlR1C1)
dbw = Application.ConvertFormula(dbw, xlR1C1, xlA1, , ActiveCell.Resize(CellsRange.Rows.Count, CellsRange.Columns.Count).Cells(CF3 + 1))
If Evaluate(dbw) = True Then CF2 = CF2 + 1
CF3 = CF3 + 1
Next CFCELL
Else
COUNTConditionColorCells = "NO-COLOR"
Exit Function
End If
COUNTConditionColorCells = CF2
End Function
For more help visit my website www.easyexcelan... or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Excel one-on-one on-line training available. Email me to arrange.
I am able to provide online help on your computer at a reasonable rate.
Check out my next one-hour Excel Webinar
www.crowdcast....
I use a Blue condensor Microphone to record my videos, here is the link
amzn.to/37gyyGa
Check out Crowdcast for creating your webinars
app.linkmink.c...
If you need to buy Office 2019 follow
amzn.to/2VX5dv8
I use Tube Buddy to help promote my videos
Check them out
www.Tubebuddy....
Follow me on Facebook
/ easyexcel.answers
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
www.youtube.com...
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.

Опубликовано:

 

19 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 73   
@tjaty2008
@tjaty2008 3 года назад
It works well. For those with the problem of getting a Zero value, use a NEW RULE in the conditional formatting and use a formula, don't use the presets. If you do that it will work, or at least, it worked for me for any range. :)
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
thank you
@OrleansMakuza
@OrleansMakuza 16 дней назад
You are a life saver, thanks🙏
@BarbHendersonconsulting
@BarbHendersonconsulting 15 дней назад
Happy to help
@AndreyChezhin
@AndreyChezhin 4 года назад
Perfect! It works for me. It's that I searched, many thanks!
@AndreyChezhin
@AndreyChezhin 4 года назад
Sorry, not all correct works, I hurried
@Angelrodri38
@Angelrodri38 4 года назад
HI Barb, thanks for this video, now I tried the code and the results on the cells is 0, is there any chance I did something wrong, resides copy and paste.
@avatar_legend
@avatar_legend 4 года назад
why does it return VALUE!! :(
@donnydjk525
@donnydjk525 Год назад
So much thank You Mam, It's help me a lot.
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
Most welcome 😊
@kaxa
@kaxa 5 месяцев назад
Is a start to solve my problem. Now i need that it work in Horizontal that will solve my problem. Great work. Please share if you have a solution to count horizontal please
@BarbHendersonconsulting
@BarbHendersonconsulting 5 месяцев назад
I have more luck with this for horizontal ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-EG1OSW5cn7E.html
@kaxa
@kaxa 5 месяцев назад
@@BarbHendersonconsulting this works perfectly THANKS
@gpclarkejr
@gpclarkejr 4 месяца назад
I assume that because the code mentions cf1, cf2, cf3. that it only covers 3 conditional formats and that if our cell has 4 conditions that we need to change the code accordingly?
@BarbHendersonconsulting
@BarbHendersonconsulting 4 месяца назад
this is a better set of code that will count all colour ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-EG1OSW5cn7E.html
@artilleryx9540
@artilleryx9540 4 года назад
thanks for the information this is going to improve my work. :)
@eagle3498
@eagle3498 5 лет назад
Hi there, i applied your method but m getting "zero" in cells where they should give me total number of color cells. Can you help.pls. thx
@wacho31
@wacho31 4 года назад
Hi I have the same, 0 is result, why?
@fcaltair1
@fcaltair1 4 года назад
Any follow up on this? Have the same problem
@sriwiyanti3143
@sriwiyanti3143 2 года назад
Any update? I have same problem
@EleazarCrucesOchoa
@EleazarCrucesOchoa 5 лет назад
Hola, excelente video. Aunque está en inglés lo entendí. ¿Como puedo descargarlo? Hello, excellent video. Although it is in English I understood it. ¿How can I download it?
@franciscarloesteban5247
@franciscarloesteban5247 2 года назад
HI. When i chose the cell with color and press enter it says NO COLOR but provided the cell selected was already colored how
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
see other reply
@ace3g
@ace3g 4 года назад
I have multiple rows with 6 cells each that are conditionally colored. When I use the code - it works with the first row but when I transfer equation to rows below it doesn't work. It either shows the same number as the first row or shows no color.
@kpkaus
@kpkaus 4 года назад
I am having the same problem have you resolved this problem?
@egooidios5061
@egooidios5061 3 года назад
Same problem here. Seems there is no solution?
@NeLzKieTV
@NeLzKieTV Год назад
Hi Burb, can you make it for multiple tables and count percentage of 1 color in all tables without conditional formatting but fill color only..
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
Check out this video. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-DY_ieB9NEYY.html
@mikelennon1078
@mikelennon1078 3 года назад
How can count the number of same colored cells in a row? Let's say conditional formatting turns some cell's background to Green in each row. How can we automatically get the SUM of the those Green colored cells in each row?
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
Mike, this code is pretty strange, it counts happily in a column but does not seem to work in a row.
@franciscarloesteban5247
@franciscarloesteban5247 2 года назад
It did not count. I am missing a formula or function. When i selected the cell with a color and hit enter it did not count.
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
Watch this video, it should help ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6Zjs2NqZTJQ.html
@kathiecrane588
@kathiecrane588 4 года назад
This worked for me when my range is a column, I need it to work when my range is a row. Help
@Natsteph
@Natsteph 3 года назад
Double check your conditional formula. It must be applied to all cells in your range.
@hungnguyencanh5013
@hungnguyencanh5013 5 лет назад
thanks, it's worked
@koreanword_daily
@koreanword_daily 4 года назад
it does not :(
@kennethbozeman7830
@kennethbozeman7830 5 лет назад
I need help. I'm trying to count after a comma and add it to the total number next to the matching numbers before the comma. Scanner gun that I using will scan and type in amount so the amount is after the comma. I'm using match and count but now add after comma.
@BarbHendersonconsulting
@BarbHendersonconsulting 5 лет назад
You could try removing the comma from the field. See my video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xArqGS67Cvs.html
@donpainchaud3316
@donpainchaud3316 Год назад
I have tried the code you show below and when I run the command i get "no_color"
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
try watching this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6Zjs2NqZTJQ.html
@donpainchaud3316
@donpainchaud3316 Год назад
is it possible to get a copy of the code. This is exactly what im looking for...Thankyou
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
replied to the other message
@EyeIn_The_Sky
@EyeIn_The_Sky 3 года назад
is there a way to get a "True" or "False" value by comparing the colour of 2 different cells? For Example, if Cell A1 and B1 are both filled in with Red then cell C1 should say "Match" or "True"?
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
if you look at the code "If CellsRange.FormatConditions(CF1).Interior.ColorIndex = ColorRng.Interior.ColorIndex Then Work = True" it is basically do just that
@edgardoconcepcion2237
@edgardoconcepcion2237 3 года назад
May i know what is possible problem why the vb code not work to my excel worksheet?
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
This code only works in a vertical line, not horizontal
@ace3g
@ace3g 4 года назад
=COUNTConditionColorCells(B2:G2,$J$1) with green color in J1. There are 2 in this 6 lot that are green and equation returns 2. The second row I'm using =COUNTConditionColorCells(B3:G3,$J$1) where there are 3 but still returning 2
@ace3g
@ace3g 4 года назад
Do I need to adjust the code since I only have one Conditional Formatting Rule?
@MrBrianb1066
@MrBrianb1066 3 года назад
Thank you for making this, it is very helpful. Is there a way to create this as a formula so that it can be used to count formatted cells for each row? Thanks in advance and great job!
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
Unfortunately not
@francisnaria3831
@francisnaria3831 2 года назад
Hi Thank you for this. I tried using the code but it only calls 1. Is there any mistake I did? I just copied the code on the description though hehe
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
Watch this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6Zjs2NqZTJQ.html
@waliullah1841
@waliullah1841 5 лет назад
nice
@zottart9847
@zottart9847 2 года назад
i get value error :(
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
Have you seen this one? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6Zjs2NqZTJQ.html
@fcaltair1
@fcaltair1 4 года назад
Hello there, nice tutorial! I copy pasted your code. However the result shows 0 only. Where did I go wrong?
@Angelrodri38
@Angelrodri38 4 года назад
I had the same result, Barb is there any chance you can help me with my excel sheet.
@sarahaddady6044
@sarahaddady6044 4 года назад
@@Angelrodri38 I had the same problem, for me it came 0 as well :(
@aneeshmohan3
@aneeshmohan3 Год назад
Me to...
@basudebdebnath9209
@basudebdebnath9209 Месяц назад
HI Barb, is it possible on office 10 ?
@BarbHendersonconsulting
@BarbHendersonconsulting Месяц назад
I created that with windows 10 but try this one it might work better for you ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-EG1OSW5cn7E.html
@jozefnagels8443
@jozefnagels8443 11 месяцев назад
Is at a module? Is it in the worksheet as a code?
@BarbHendersonconsulting
@BarbHendersonconsulting 11 месяцев назад
This would be in a module
@edgardoconcepcion2237
@edgardoconcepcion2237 3 года назад
I try the code but when i apply to excel it doesnt work
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
it only works in vertical lists of data
@koreanword_daily
@koreanword_daily 4 года назад
Sorry, but it does not work :(
@missaskham6883
@missaskham6883 3 года назад
Where is the code??
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
in the description of the video
@brendanstover8442
@brendanstover8442 3 года назад
This doesn't work
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
it only works on a list of vertical cells, sorry
@brendanstover8442
@brendanstover8442 3 года назад
@@BarbHendersonconsulting Is there a way to do this on the horizontal?
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
@@brendanstover8442 I have work on this for hours and have not been able to get it to work on the horizontal. If you can figure out the answer, I will be your biggest fan!
@brendanstover8442
@brendanstover8442 3 года назад
@@BarbHendersonconsulting Hmm....If I can figure it out i'll be sure to circle back : )
Далее
Count Colored Cells in Excel (using Formula or VBA)
10:21
Count colored cells in excel - Without VBA
9:42
Просмотров 47 тыс.
How to count colored cells in Excel
6:47
Просмотров 269 тыс.
Learn How to Count Cells by Color in Microsoft Excel
6:33
How to use COUNTIF and COUNTIFS in Microsoft Excel
14:36
Count by Cell Colour - Excel VBA Function
4:54
Просмотров 25 тыс.
Excel COUNTIF & SUMIF On Colour - No VBA Required
5:14