Description: The condition "giorno.settimana(a2;2)=6" (in italian) of conditional formatting on a range of dates produces a fill of colors even in empty cells. With values 1,2,3,4,5,7 the formula works correctly Steps to Reproduce: 1.a1 = 31/12/2020 2.a2 = a1 + 1 3.copy a2 down to line 182 4.move the January days to B2 5.move the days of February to D2 ... 9.move the days of June to L2 10.select B2: L32 11.cell format to DD 12. select range B2:L32 13.conditional formatting B2: L32 14.condition 14.a- the formula is -> GIORNO.SETTIMANA(B2;2)=7 14.b- new style 14.c- background -> RED 3 14.d- font -> 12 pt 14.e- font color -> yellow 2 15. OK 16. Correct conditional formatting. 17. Manage rules 17.a change in the formula the "7" to "6" Actual Results: the conditional formatting fills all the empty spaces in the range. Expected Results: the same results as the values 1,2,3,4,5,7 Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: Versione: 7.0.3.1 (x64) Build d7547858d014d4cf69878db179d326fc3483e082 thread CPU: 4 SO:Windows 10.0 Build 19041 Resa Interfaccia Skia/Raster; VCL: win Locale it-IT (it_IT); interfaccia utente: it-IT Varie: Calc:threaded
Please attach a sample file to test.
I think you need to verify in the condition if the cell is empty or zero, because zero/empty represent also a date, 30/12/1899.
Created attachment 168722 [details] example
As I was thinking, comment#2. With a formula like: IF(ISBLANK(B2);0;WEEKDAY(B2;2)=$P$2) make it work.