Counting cells in a column based on format?

djroppolo

Board Regular
Joined
Jun 25, 2005
Messages
66
Is it possible to determine the number of cells in a column who contain a particular format? For instance, I have formatted every cell in a particular column to be highlighted in red if its value also appears in another column. After this formula is executed i'm left with a ton of cells that have been highlighted. Is it possible to count how many are highlighted without doing it one by one?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You can't count by color without a macro--so why not just count by the same criteria you're using to color?

This seems to work for me:
Book1
ABCD
115
22155
33365
4457
558
6626
771
8877
995
10109
Sheet2


B1:B10 has conditional formatting to highlight the cells that have the same value as a cell in A1:A10 (the HTML Maker doesn't show conditional formats, the highlighting was added by me).

The formula in D2 does the same thing, except it displays the result instead of highlighting.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,731
Members
452,939
Latest member
WCrawford

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