Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88030

Excel COUNTIF with conditional formatting

$
0
0

I have one sheet (Attendance Sheet) where I have entered attendance of employees manually.

Now there are a few conditional formattings applied on the sheet. For example:

  1. If someone enters the office after 9:30AM a yellow color will highlight the cell.
  2. If someone is absent a "A" in the cell will highlight the cell as red color.
  3. If someone is on leave a "Leave" in the cell will highlight the cell as green color. and so on...

This all works fine and flawlessly.

Now to the issue.

I have manually set the colors in the "Legend" area in the sheet for reference for the formula, countif.

https://imgur.com/a/FLsAV

When I want to use COUNTIF to calculate the total number of days the employee was late, absent or on leave, I select a cell, enter the formula, for example I want to count the number of days the employee was Late, I use, =COUNTIF(H1:H30,A4)... (Where A4 is the cell of the Yellow color and H1:H30 is the range).

and the result returns "0" while I have Yellow cells highlighted via conditional formatting. I have tried working on this several hours via google and YouTube but to no avail.

Please help.


Viewing all articles
Browse latest Browse all 88030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>