如何在 Google 表格中根据星期几突出显示单元格?
How do I highlight cells based on the day of the week in Google Sheets?
我试图突出显示 Google 工作表中基于今天日期的星期几(仅文本)的单元格。
基本上,我有一个包含 M-T-W-TH-F-S-SU 的专栏(未注明日期,只是文本),我希望它突出显示当前使用条件格式或其他内容的星期几。因此,如果今天是星期二,星期二将突出显示。请记住,该单元格当前没有日期,我需要它显示为文本。我怎样才能用一个简单的公式来做到这一点?
=IF(TEXT(TODAY(),"ddd")=IFERROR(VLOOKUP(A1,
{{"M","Mon"};{"T","Tue"};{"W","Wed"};{"TH","Thu"};{"F","Fri"};{"S","Sat"};{"SU","Sun"}},
2,0)),1)
请select相关列(A假设)和:格式>条件格式...,单元格格式如果...自定义公式是和:
=weekday(today())=switch(A1,"M",2,"T",3,"W",4,"TH",5,"F",6,"S",7,"SU",1,"")
突出显示您的选择。比另一个答案的一半多一点。
我试图突出显示 Google 工作表中基于今天日期的星期几(仅文本)的单元格。
基本上,我有一个包含 M-T-W-TH-F-S-SU 的专栏(未注明日期,只是文本),我希望它突出显示当前使用条件格式或其他内容的星期几。因此,如果今天是星期二,星期二将突出显示。请记住,该单元格当前没有日期,我需要它显示为文本。我怎样才能用一个简单的公式来做到这一点?
=IF(TEXT(TODAY(),"ddd")=IFERROR(VLOOKUP(A1,
{{"M","Mon"};{"T","Tue"};{"W","Wed"};{"TH","Thu"};{"F","Fri"};{"S","Sat"};{"SU","Sun"}},
2,0)),1)
请select相关列(A假设)和:格式>条件格式...,单元格格式如果...自定义公式是和:
=weekday(today())=switch(A1,"M",2,"T",3,"W",4,"TH",5,"F",6,"S",7,"SU",1,"")
突出显示您的选择。比另一个答案的一半多一点。