You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Sheets条件格式需求:今日在活动日期范围时高亮日期单元格

How to Highlight Event Date Range in Google Sheets When Today Falls Within It

Got it, let’s get this sorted for you! The key here is using a custom formula rule in Google Sheets’ conditional formatting—this lets you check if today sits between your start and end dates, and keeps both cells highlighted as long as that’s true, even as dates update automatically.

Step 1: Select Your Target Cells

  • For a single event (row 2), click and drag to select cells A2 and B2.
  • If you have multiple events in rows below (like A3:B3, A4:B4), select the entire columns A:B instead—this will apply the rule to every row automatically.

Step 2: Open Conditional Formatting

  1. Click the Format menu at the top of Google Sheets.
  2. Choose Conditional formatting from the dropdown. The conditional formatting sidebar will pop up on the right.

Step 3: Set Up the Custom Formula Rule

In the sidebar:

  1. Under "Format cells if", click the default dropdown (usually "Is equal to") and scroll to select Custom formula is.
  2. Paste this formula into the input box:
    =AND(TODAY()>=A2, TODAY()<=B2)
    
    Let’s break this down simply:
    • TODAY() pulls the current date automatically—no manual updates needed.
    • TODAY()>=A2 checks if today is on or after the event start date in A2.
    • TODAY()<=B2 checks if today is on or before the event end date in B2.
    • AND() ensures both conditions are true—so the highlight only shows when today is between the start and end dates (inclusive).

Step 4: Pick Your Highlight Style

Under "Formatting style", choose a fill color, text color, or other formatting to make the cells stand out. A soft yellow fill is a great go-to for gentle visibility.

Step 5: Save the Rule

Click Done in the sidebar, and you’re all set!

How It Behaves Over Time

  • As long as today is within the event’s date range, A2 and B2 (or the corresponding row’s cells) will stay highlighted.
  • Once today passes the end date, the TODAY()<=B2 condition will fail, and the highlight will disappear on its own—no need to manually turn it off!

内容的提问来源于stack exchange,提问作者Marcos Medina

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 18:05:17