Тёмный

Excel Count Conditional Formatting Colours 

John McLaughlin
Подписаться 35
Просмотров 13 тыс.
50% 1

How To Count Cells By Colors With Conditional Formatting In Excel || How To Count Coloured Cells
Watch this video to understand how to How To Count Cells By Colors With Conditional Formatting In Excel
VBA code:
Button:
Private Sub Refresh_Click()
'Team 1
Call CountColorCellsAQ3
End Sub
Private Sub CountColorCellsAQ3()
'Variable declaration
Dim rng As Range
Dim lColorCounter As Long
Dim rngCell As Range
'Set the range of cells to count
Set rng = Sheet2.Range("U3:AL3")
'loop throught each cell in the range
For Each rngCell In rng
'Checking Red color
If Cells(rngCell.Row, rngCell.Column).DisplayFormat.Interior.Color = RGB(255, 153, 153) Then
lColorCounter = lColorCounter + 1
End If
Next
'Display the total number of red cells in cell listed below
Sheet2.Range("AQ3") = lColorCounter
End Sub
--------------------------------
If you would like to subscribe to see what other things I think could be useful please visit my channel - / @johnmclaughlin5706

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

 

16 сен 2019

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@cuongnguyenhuu6593
@cuongnguyenhuu6593 3 года назад
thank you bro... the only video showing the code runs on my expectation of the assignment. this video deserves to have millions of views.
@johnmclaughlin5706
@johnmclaughlin5706 3 года назад
Glad it helped!
@jrmanning5920
@jrmanning5920 3 года назад
Ok so this is exactly what i am looking for to be able to count errors on several different Sheets. My errors are highlighted with conditional format colors. I want to put together a count of how many errors exist on any given sheet by using this method. But i can not get it to work as you do not give enough formula information about the cells containg the results. What formula do i put into my cell that will display the results? I would love to have some more detailed information about this please. AMAZING WORK by the way..
@rockmm6320
@rockmm6320 3 года назад
Hi can you explain from the beginning starting from VBA coding in next video thanx
@MrBrianb1066
@MrBrianb1066 3 года назад
This is really excellent, but I'm having trouble getting it to work. Is this dependent on having a refresh button?
@johnmclaughlin5706
@johnmclaughlin5706 3 года назад
Hi brian, this is dependent on having a refresh button as the code runs upon a button click, you can see the code behind this in the Video at about 2:25 minutes into the video, if you need any help let me know :).
@einyv
@einyv 3 года назад
So you have to code for every row, no looping per we. I have 90 rows need to count the red in each row.. But was looking for a loop.. Thanks though!
@noelcamba943
@noelcamba943 4 года назад
Please give a copy of your file. What fromula did you use in Cell AQ3. Thanks for the reply.
@stephenyekwulog4750
@stephenyekwulog4750 Год назад
Can i get a copy of this file
@cyndilortan4544
@cyndilortan4544 2 года назад
Hi -- I have the code working but when I hit the refresh button nothing changes.
@johnmclaughlin5706
@johnmclaughlin5706 2 года назад
Hi Cyndi, I am pleased that the code helped and is working, I’d be more than happy to review the code you have if you’re able to show me the configuration. We can work out why the button isn’t working?
@ahmeddef
@ahmeddef 4 года назад
Can we make it as user defined function
@johnmclaughlin5706
@johnmclaughlin5706 3 года назад
Hi Ahmed, I am not sure if you can make this a user defined function. I could look into this if you like?
@noelcamba943
@noelcamba943 4 года назад
Please send me a copy of your file. Thnak you.
@johnmclaughlin5706
@johnmclaughlin5706 3 года назад
I can send a copy of the code however the file is not possible.
Далее
Count Colored Cells in Excel (using Formula or VBA)
10:21
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МНЕ ИСПОРТИЛИ МАШИНУ #shorts
00:30
Просмотров 1,1 млн
Learn How to Count Cells by Color in Microsoft Excel
6:33
SUM AND COUNT CELLS BASED ON COLOR IN EXCEL (NO VBA)
8:07
Sum Cells Based on Their Color in Excel (Formula & VBA)
12:18
SUM and COUNT by Cell Colour in Excel -- WITHOUT VBA!
16:32