VBA to count formatted cells by colour

ElizabethA

New Member
Joined
Oct 27, 2017
Messages
3
hello

I'm trying to add cells in a row which have been previously formatted by colour when they contain a tick mark.

I can add the cells by colour when they have not been formatted but I have cells which need to contain a check mark with no highlight and cells which contain a check mark with highlight. I need to count both seperatly. c
I have been able to count cells containing only a tick but am struggling to count cells with a tick which have been then formatted to change colour. My cells which need to be counted will not necessarily be next to each other. There will be blank cells and cells containing other date in between.

many thanks
Liz
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
for j=1 to 10
for k=1 to 10
if cells(j,k)="tickcharacter" then ticktot=ticktot+1
next k
next j
cells(1,15)=ticktot
end sub

I do not know which font set you get the tick from

now colours

will counting all cells that have any color be ok
likewise tick cells that are non blank
 
Upvote 0
for j=1 to 10
for k=1 to 10
if cells(j,k)="tickcharacter" then ticktot=ticktot+1
next k
next j
cells(1,15)=ticktot
end sub

I do not know which font set you get the tick from

now colours

will counting all cells that have any color be ok
likewise tick cells that are non blank



Hello

I used the windings font to enter my tick. When i have entered this the conditional format turns the cell light grey. It is these cells in a row i need to count.
 
Upvote 0
if there is a tick, and all ticks are grey, just count the ticks ???

not sure I understand what you want here.....;.
 
Upvote 0
hi - as i mentioned in my previous message there are two columns i need to count 1) tick only 2)formatted cell also with a tick .
not to worry Ive sorted it myself by changing the symbol slightly in the second column. My sheet now works and it will allow me time to learn more about vba for next time.





Hello

I used the windings font to enter my tick. When i have entered this the conditional format turns the cell light grey. It is these cells in a row i need to count.
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top