1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Excelで左右のセルを比較する関数

Posted at

概要

ツールの追加が出来ない作業用PCで、WinMergeなどの比較ツールが無い時にExcelで簡単に比較を行う手順。

解説

  1. A列とB列に比較したい文字列を並べる
    image.png

  2. C1に以下の関数を追加し、オートフィルでC2とC3にコピーする
    =IF(A1=B1,"〇","×")
    image.png

  3. C列を選択し、「ホーム」-「条件付き書式」-「セルの強調表示ルール」-「文字列」を選び、次の文字列を含むセルを書式設定に「×」と入力してOK
    (×が赤で協調される)
    image.png

応用

毎回指定するセルを選ぶのはめんどくさいので応用

  • 1つ左のセル値参照
    =INDIRECT(ADDRESS(ROW(),COLUMN()-1))
  • 2つ左のセル値参照
    =INDIRECT(ADDRESS(ROW(),COLUMN()-2))

以下の関数にする事で、どの列でも使用可能となる
=IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))=INDIRECT(ADDRESS(ROW(),COLUMN()-2)),"〇","×")

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?