如何根据星期几在Google表格中突出显示单元格? [英] How do I highlight cells based on the day of the week in Google Sheets?

查看:78
本文介绍了如何根据星期几在Google表格中突出显示单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据今天的日期突出显示每周几日(仅文本)的Google表格中的单元格.

I'm trying to highlight the cells in Google Sheets that are days of the week (text only) based on today's date.

基本上,我有一列包含M-T-W-TH-F-S-SU(未注明日期,仅是文本)的列,我希望它突出显示当前使用条件格式或其他格式的星期几.因此,如果今天是星期二,则将突出显示星期二.请记住,该单元格当前没有日期,我需要将其显示为文本.如何用一个简单的公式来做到这一点?

Basically, I have a column that has M-T-W-TH-F-S-SU in it (undated, just text) and I want it to highlight the day of the week it currently is with conditional formatting or whatever. So if it's Tuesday today, Tuesday will be highlighted. Keep in mind the cell doesn't have a date in it currently, I need it to show as text. How can I do this with a simple formula or so?

推荐答案

=IF(TEXT(TODAY(),"ddd")=IFERROR(VLOOKUP(A1,
 {{"M","Mon"};{"T","Tue"};{"W","Wed"};{"TH","Thu"};{"F","Fri"};{"S","Sat"};{"SU","Sun"}},
 2,0)),1)

这篇关于如何根据星期几在Google表格中突出显示单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆