Sep 06 2020 03:47 PM
Hi all,
I have a table that contains all current month days, the days are displayed on each column.
For example, in my B1 cell, I added the following function:
=DATE(Tableau2[Current year],Tableau2[Starting month],1)
Tableau2[Current year] = 2020 and Tableau2[Starting month] = 1 (January)
The cell C1 will contains
=B1+1
What I need is, if the current day is saturday or sunday, then the cell will be disable or just the background will change. But my problem is that I can't check that with the function IF, I can't verify the value of B1 or C1.
My question is, how can I create a condition to check the value or the result of a function in a specific cell?
Sep 06 2020 08:51 PM
@spamitovic You may use Conditional Formatting to achieve what you describe. It formats cells based on its displayed content, not the underlying formula. A working example is attached.
Sep 07 2020 04:46 PM
@Riny_van_Eekelen Yes but I can apply these conditions only the two first line.
You can check in the attachment, when I try to select all tables, the condition is applied to other cells that are not required.
I need to change the background only for the weekends.
Sep 07 2020 06:03 PM
Solution@spamitovic The translation isn't very good but I think what you want is to add '$' in formula as so:
=OR(WEEKDAY(C$3,2)=6,WEEKDAY(C$3,2)=7)
Sep 07 2020 10:34 PM
@spamitovic Add the dollar signs as @mtarler suggested and it will work.
Sep 08 2020 10:11 AM
Thank you so much for your help. Problem solved now.
Sep 07 2020 06:03 PM
Solution@spamitovic The translation isn't very good but I think what you want is to add '$' in formula as so:
=OR(WEEKDAY(C$3,2)=6,WEEKDAY(C$3,2)=7)