10
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Excel】vlookup

Last updated at Posted at 2014-05-21

いつも忘れるのでメモ。

書式

=VLOOKUP(検索値,範囲, 列番号, 検索方法)

範囲内で、検索値(範囲の最も左)に対応する値(範囲の列番号)を返す。
検索方法は、trueだと値が存在しない場合に最大値を返す。falseだと値が存在しない場合に、#N/Aを返す。省略した場合は、trueとなる。

例えば

こんな場合に、

A列 B列
1 ノートPC ①対応する単価を表示したい。
2 マウス 対応する単価を表示したい。
3 ノートPC 対応する単価を表示したい。
C列 D列
1 ノートPC 50,000
2 マウス 1,000
3 ノートPC 5,000

「①対応する単価を表示したい」のところに、
=vlookup(A1,C1:D3,2)
と書くと、対応する単価が表示される。

ちなみに

頭が0始まりだと、一方は文字で一方は数値になっていて、同じと判定されない。

10
8
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
10
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?