is there a way, if I want to highlight the cell if the date is current week, past week and next week ?
CodePudding user response:
CodePudding user response:
see WEEKNUM()
:
try:
past
=(WEEKNUM(A1, 2)<WEEKNUM(TODAY(), 2))*(A1<>"")
present
=(WEEKNUM(A1, 2)=WEEKNUM(TODAY(), 2))*(A1<>"")
future
=(WEEKNUM(A1, 2)>WEEKNUM(TODAY(), 2))*(A1<>"")
to look only one week into past & future you can do:
past
=(WEEKNUM(A1, 2)<WEEKNUM(TODAY(), 2))*(WEEKNUM(A1, 2)=WEEKNUM(TODAY(), 2)-1)*(A1<>"")
future
=(WEEKNUM(A1, 2)>WEEKNUM(TODAY(), 2))*(WEEKNUM(A1, 2)=WEEKNUM(TODAY(), 2) 1)*(A1<>"")