• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional Fomatting Rule not working

Alain

New Member
I am working on an employee attendance tracking sheet, and I have conditional formatting rules that change the color of a cell in the calendar depending on the type of leave used. The challenge I have is when a user uses more than one leave type on the same day. The conditional formatting rule applied is based on the last entry on the data sheet. What I want to happen is if there is more than one leave type used on the same day, change the cell to Black with white bold text.

On my data sheet, I added a helper column (Multiple Types), and named the range (lstDataMType) to identify the duplicates in question. I referenced this in my formula but it does not work as I expected. I have attached the sheet.

The formula I use for the data validation formula is:

=(MONTH(H9)=MONTH($C9))*(SUMPRODUCT((lstDataName=valSelectName)*(YEAR(lstDataDate)=valSelectYear)*(lstDataDate<=H9)*(lstDataDate>=H9)*(lstDataMType=1))>0)

A solution that does not use the helper column would be ideal.

Thanks
 
I did get an error when I was uploading, so I tried again and the second time it looked like it was successful. Regardless the file should be attached now. Thanks to oldchippy for the heads up.
 

Attachments

  • Attendance Tracking.xlsx
    40.3 KB · Views: 5
Its now working. Not sure why, all I did was move the offending rule to the top of the precedence list and now all works as it should.

Thanks
 
if there is more than one leave type used on the same day, change the cell to Black with white bold text.

I have not checked all the condition.. but as per your query..
You can set preference.. accordingly.. if you want to give preference BLACK one over other.. you can move it to the top in the list..

upload_2014-5-1_23-42-7.png

Please check and confirm..
 
Thanks Debraj, as you can see by the thread, I just tried it before you posted your reply. I am not sure I understand why, but it is more efficient this way. I told excel to stop checking after this rule, which should speed things up as the data grows.

Thanks again.
 
Back
Top