Home > Mobile >  GOOGLE SHEET FORMULA spreadsheet
GOOGLE SHEET FORMULA spreadsheet

Time:08-26

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:

Since you didn't include your enter image description here

enter image description here

CodePudding user response:

see WEEKNUM():

enter image description here


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<>"")

enter image description here

  • Related