Forum Discussion
Check the value of a function
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?
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)
5 Replies
- Riny_van_EekelenPlatinum Contributor
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.
- spamitovicCopper Contributor
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.
- Riny_van_EekelenPlatinum Contributor
spamitovic Add the dollar signs as mtarler suggested and it will work.