他のセルに基づく Excel の条件付き書式

色を変えたいセルを選び、Excel では「ホーム > 条件付き書式 > 新しいルール > 数式を使用」、Google Sheets では「表示形式 > 条件付き書式」の「カスタム数式」を使います。しきい値は別セルに置き、=$B2>=$F$1 のように絶対参照します。F1 を変えればルールを編集する必要はありません。数式は選択範囲の左上のセル向けに書きます。

目次

要点

色を変えたいセルを選び、Excel では「ホーム > 条件付き書式 > 新しいルール > 数式を使用」、Google Sheets では「表示形式 > 条件付き書式」の「カスタム数式」を使います。しきい値は別セルに置き、=$B2>=$F$1 のように絶対参照します。F1 を変えればルールを編集する必要はありません。数式は選択範囲の左上のセル向けに書きます。

=$B2>=$F$1

確認のポイント

2026年11月12日の確認では、F1 が 2000 のとき 2500 は TRUE、1800 と 1200 は FALSE でした。行全体のルールでは列だけを固定します。東かつ売上 2500 の AND は TRUE、東かつ 1200 は FALSE です。日付の比較には実際の日付値が必要です。

注意点と互換性

他シートのしきい値はシート名付きの絶対参照で指定します。古い Excel が他シート参照を受け付けない場合は、名前を定義するか同じシートに置きます。色を数えるのではなく、同じ条件の COUNTIFS を使います。ドロップダウンがあると表記のずれを減らせます。数式はアクティブ セル向けに書き、絶対参照と相対参照を区別してください。

英語の詳細例・数式・著者メモ

Tested in: The threshold and comparison formulas below were evaluated in Google Sheets on 12 November 2026. Excel 365 menu names are the current desktop labels; I did not click through the rule dialogs in Excel this session.

This page is about rules that look at a different cell than the one being painted. For color scales, built-in “greater than” rules, and the basics of formula rules, see Conditional Formatting in Excel.

One threshold cell, many rows

Put the cutoff in its own cell so you can change it without editing the rule. On 12 November 2026 I used 2000 in F1 and tested three sales figures:

=2500>=$F$1
=1800>=$F$1
=1200>=$F$1

Those returned TRUE, FALSE, and FALSE. So 2500 would be formatted; 1800 and 1200 would not. If you write =$B2>=2000 instead, you have to open the rule every time the cutoff moves.

In Excel 365

  1. Type the threshold in F1.
  2. Select B2:B10 (the sales column, not F1).
  3. Open Home > Conditional Formatting > New Rule.
  4. Choose Use a formula to determine which cells to format.
  5. Enter =$B2>=$F$1. Write it as it should read for the active cell, usually the top-left cell of the selection.
  6. Set a fill or a font color, then click OK.

In Google Sheets

  1. Select B2:B10.
  2. Open Format > Conditional formatting.
  3. Set Format cells if to Custom formula is.
  4. Enter =$B2>=$F$1.
  5. Choose a color and click Done.

If the colors land on the wrong rows, the formula was probably written for a different active cell than the one Excel or Sheets is using. Select B2 first, then extend the range down, then write the formula with B2 in it.

Highlight a whole row from another column

Select A2:C10, not just column B, and lock the column you want to test:

=$A2="East"

Every cell in row 2 now looks at A2; row 3 looks at A3. In the same Sheets check, "East"="East" was TRUE and "West"="East" was FALSE.

To require both a region and a threshold, combine the tests:

=AND($A2="East",$B2>=$F$1)

With F1 still at 2000, AND("East"="East",2500>=$F$1) returned TRUE, and AND("East"="East",1200>=$F$1) returned FALSE. East with sales of 1200 does not pass, because 1200 is below the cutoff. A missing $ on A, such as =A2="East" applied to A2:C10, will test B2 and C2 as they walk right, and only the first column will behave.

The same pattern works for a quantity target in another cell: =$E2>=$G$1. A 40-unit order against a target of 35 returned TRUE in the 12 November 2026 check (=40>=35).

Dates, and a cell on another sheet

To format rows whose date is on or after a start date in F1 (a real date, not text), use:

=$A2>=$F$1

In the test workbook, =DATE(2024,3,4)>=DATE(2024,3,1) was TRUE and =DATE(2024,2,5)>=DATE(2024,3,1) was FALSE. If F1 is text that only looks like a date, the comparison will mis-fire; see dates stored as text.

A threshold on another sheet is just a qualified address:

=$B2>=Settings!$A$1

Keep Settings!$A$1 absolute so every row uses that one cell. If an older Excel build rejects a cross-sheet reference in a conditional formatting formula, define a name that points at Settings!$A$1 and use the name in the rule, or place a copy of the threshold on the same sheet.

The $ signs, and things that look like a broken rule

Write the formula for the active cell, then decide what should stay put. A threshold is almost always absolute ($F$1). A column that supplies the test for a whole row is mixed ($A2). Two columns compared in the same row, such as “actual vs target on this row,” are usually relative in the row and locked in the column: =$B2>=$C2.

Conditional formatting does not change the value in the cell, and you should not count colors with a formula. If you need a count of rows that meet the same test, use COUNTIFS or SUMPRODUCT with that logic, as in COUNTIF vs COUNTIFS vs SUMPRODUCT.

A drop-down for the region, from How to Add a Drop-Down List in Excel, keeps the text in column A consistent so =$A2="East" does not miss "east " with a trailing space. Existing values that were typed before the drop-down was added still need a cleanup.

Stop after you have one working rule and a threshold you can edit. A pile of overlapping formula rules, each pointing at a slightly different cell, is harder to debug than a helper column that holds the TRUE/FALSE test and a single format rule that looks at that helper.

Oscar

表計算の数式とトラブル解決を紹介。検証環境と未確認事項は各記事を参照。

Tested in Google Sheets (via Sheets API) on 12 November 2026: a threshold of 2000 in F1, sales of 2500/1800/1200, AND with a region test, and two date comparisons. Excel 365 menu names are the current desktop labels; I did not click through these rules in Excel this session..

次の記事:データの整形と入力 Excel で日付の条件付き書式(期限超過、近日、週末)