Condition formatting - count how many of the same color OR value appears in the list ?

MasterBash

Board Regular
Joined
Jan 22, 2022
Messages
70
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am looking to add more to the conditional formatting from this post here : Using conditional formatting with Table as reference ?

I would repost my excel table using XL2BB, but I forgot it at work. I tried a copy and paste of the table from the link above, but it looked terrible.

Conditional Formatting above is not correct but that is not the point of the my post (In my project, it has an updated formula and it works).

I would like to know how many times each colors (table header of column C, D and E) or each group of values (Values under headers of column C, D and E) appear in column A, input the numbers in column B under each Column 1, 2 and 3.

So if the green color or any of the values under Column D appear 5 times in column A, then I would like of the formula to equal 5 in column B, under Column 2 :

Color or values, but I think values would be a better option than using colors, because if I want to update the colors one day, then the formula may not work anymore. However, I am already using named list for those columns (Lets say, Column1_list, Column2_list, Column3_list), so it may be easier to use the list of values instead of the header colors.

Thank you.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Whatever formula you are using to colour the cells can be used to count the values, if I understand your request and its relation to the linked post. Is this what you mean?
Book1
ABCDEFGH
1COUNTSColumn1Column2Column3Column1Column2Column3
2741616500018871365778814165422226666
3498479100088464519976314646411V016A88
422226666001299844332634169419647982
5891919000MR6497226
646411V016A8800197141942V47
7MR649722600144556987
82998443310099988847
94547944165000
1018871365100
112113377916000
1216916149000
1397141942V47001
14469499000
15MR6497226001
168846451100
Sheet1
Cell Formulas
RangeFormula
B2:B16B2=COUNTIF(Table1[[#All],[Column1]],$A2)
C2:C16C2=COUNTIF(Table1[[#All],[Column2]],$A2)
D2:D16D2=COUNTIF(Table1[[#All],[Column3]],$A2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:D16Expression=COUNTIF($F$2:$F$8,$A2)>0textNO
A2:D16Expression=COUNTIF($G$2:$G$8,$A2)>0textNO
A2:D16Expression=COUNTIF($H$1:$H$8,$A2)>0textNO
 
Upvote 0
Almost. :)

I would like the total count of column A for all values in each columns of the table (Total count of the values in Column1, Total count of the values in Column2, Total count of Column3).

So if any of the values in column F shows up 5 times in column A, I would just like the total count of it. Column A : 5
In other words, I want to know how many times any of the values in column F shows in Column A, how many times any of the values in column G shows up in the column A and how many times any of the values in column H shows up in column A.

Thank you. :)
 
Last edited:
Upvote 0
I'm working on Excel2013 and the web version of 365. The XL2BB is from 2013, and the jpg is from Web365. You can use the formula below in Excel 365 without array entry.
Excel Formula:
=SUM(COUNTIF($A$2:$A$16,F2:F9))

2024-10-05.xlsx
ABCDEFGHI
1COUNTSColumn1Column2Column3Column1Column2Column3
2741616500018871365778814165422226666
3498479100088464519976314646411V016A88
422226666001299844332634169419647982
5891919000MR6497226
646411V016A8800197141942V47
7MR649722600144556987
82998443310099988847
94547944165000
1018871365100305Total
112113377916000
1216916149000
1397141942V47001
14469499000
15MR6497226001
168846451100
17Total305
Sheet1
Cell Formulas
RangeFormula
B2:B16B2=COUNTIF(Table1[[#All],[Column1]],$A2)
C2:C16C2=COUNTIF(Table1[[#All],[Column2]],$A2)
D2:D16D2=COUNTIF(Table1[[#All],[Column3]],$A2)
B17:D17B17=SUM(B2:B16)
F10:H10F10=SUM(COUNTIF($A$2:$A$16,F2:F9))
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:D16,B17:D17Expression=COUNTIF($F$2:$F$8,$A2)>0textNO
A2:D16,B17:D17Expression=COUNTIF($G$2:$G$8,$A2)>0textNO
A2:D16,B17:D17Expression=COUNTIF($H$1:$H$8,$A2)>0textNO

1728170735794.png
 
Upvote 0
Solution

Forum statistics

Threads
1,224,813
Messages
6,181,107
Members
453,021
Latest member
Justyna P

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