Counting the cells which have yellow as background

Sayan2795

New Member
Joined
Sep 8, 2018
Messages
13
Hi,
I have a statement where conditional formatting has been done to mark the cells which do not fall under the condition with yellow color. So the table is like this

Characteristics date1 date2 date3 date4
A1. Val1. Val2. Val3. Val4
A2. Val1. Val2. Val3. Val4

Now some values under the date fall under the conditional formatting criteria.
The thing I have to do is put a column after the last column which counts the number of cells in a row with a background color as yellow.
The main problem is , the data in the cell is extracted from a macro hence the number of columns keep changing. But the number of rows is same i.e 258. So to add a column which counts the number of yellow cells in a row we first need to find the last column and then add a new column after that to put the values or count of yellow cells.
Please help
Thank you
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
@Aladin Akyurek
Thank you For you response. The formula is very complicated and takes in values from multiple sheet. It won't be easy to explain here . That's why I need to count based on cell colors. Can you help ??

Thank you
 
Upvote 0
@Aladin Akyurek
Thank you For you response. The formula is very complicated and takes in values from multiple sheet. It won't be easy to explain here . That's why I need to count based on cell colors. Can you help ??

Thank you

I was asking for the formula that you use in conditional formatting. That formula or the information it provides can be used to obtain the desired count. Otherwise you need vba the other helpers might want to provide.
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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