Excel Tutorial - Example of how to use the VLOOKUP functionエクセルチュートリアル-の例をどのように使用してv lookup関数

Posted on September 5, 2007 at 1:50 pm投稿され2007年9月5日、 1時50時まで

Here’s a quick tutorial for those who need help using the VLOOKUP function in Excel.次の簡単なチュートリアルをそれらの助けを必要としてvlookup関数を使用してexcelします。 VLOOKUP is a very useful function for easily searching through one or more columns in large worksheets to find related data. vlookupはとても便利な機能を簡単に検索するために、 1つまたは複数のカラムに関連するデータの大規模なワークシートを見つけました。 You can use HLOOKUP to do the same thing for one or more rows of data.使用することができhlookupには、同じものを1つまたは複数ののデータをします。 Basically when using VLOOKUP, you’re asking “Here’s a value, find that value in this other set of data, and then return to me the value of another column in that same set of data.”基本的に使用する際vlookup 、君は求めて"次の値は、この値を発見した他のデータを設定して、それから私に戻って別の列の値を設定し、そのデータと同じ"と述べた。

So you might ask how this can be useful?どのようにこのよう頼むかもしれないのでお役に立つことができますか? Well, take for example, the followingさて、かかるたとえば、次の sample spreadsheetサンプルスプレッドシート I have created for this tutorial.私はこのチュートリアルのために作成されます。 The spreadsheet is very simple: one sheet has information on a couple of car owners such as name, id of the car, color and horsepower.スプレッドシートにはとても簡単です: 1枚のシートにはいくつかの情報を車の所有者などの名前、 idを、車の色や馬力ます。 The second sheet has the id of the cars and their actual model names. 2つ目のシートには、 idを自分の車と実際のモデル名となります。 The common data item between the two sheets is the car id.共通のデータ項目の間には、 2つのシートを車のidです。

Now if I wanted to display the name of the car on sheet 1, I can use VLOOKUP to lookup each value in the car owners sheet, find that value in the second sheet, and then return the second column (the car model) as my desired value.今もし私の名前を表示したかった車をシート1 、私はそれぞれの値を使用しvlookupをルックアップシートの所有者、車の中で、 2つ目のシートを発見した値を、そして2番目の列を返す(車のモデル)として私任意の値です。 So how do you go about this?これについてはどうやって行くのですか? Well first you’ll need to enter the formula into cell H4 .最初の井戸を入力していただく必要があり公式に細胞h4ます。 Notice that I have already entered the full formula into cell F4 through F9 .私はすでに注意して入力した数式をフル細胞f4キーを通じてf9ます。 We’ll walk through what each parameter in that formula actually means.各パラメータを歩くいたしますどのような手段で、実際にフォーミュラます。

Here’s what the formula looks like complete:次のようなもののように、完全な公式:

=VLOOKUP(B4,Sheet2!$A:$B,2,FALSE) = vlookup (卒研、 sheet2 !$ : $ bの、 2 、虚偽)

There are 5 parts to this function:そこには5つの部分にこの機能:

1. =VLOOKUP - The = denotes that this cell will contain a function and in our case that is the VLOOKUP function to search through one or more columns of data. 1 。 = vlookup -=表示して、この機能と細胞が含まれている場合、私たちは、 v lookup関数を検索し、 1つまたは複数の列のデータを介しています。

2. B4 - The first argument for the function. 2 。 卒研 -最初の引数は、機能します。 This is the actual search term that we want look for.これは、実際の検索用語を探したいしています。 The search word or value is whatever is entered into cell B4.検索単語または値はどのように入力して細胞卒研します。

3. Sheet2!$A:$B - The range of cells on Sheet2 that we want to search through to find our search value in B4. 3 。 sheet2 !$ : $ bの -の範囲内のセルをs heet2して検索したいを通じてg oogleの検索を見つけるの値は卒研します。 Since the range resides on Sheet2, we need to precede the range with the name of the sheet followed by an !.範囲内に居住して以来、上sheet2 、私たちの前に置く必要があるの範囲内での名前をシートに続いて!ました。 If the data is on the same sheet, there is no need for the prefix.データがある場合は、同じシート、プレフィックスの必要はありませんします。 You can also use named ranges here if you like.名前を使用することもできレンジのような場合は、ここにいます。

4. 2 - This number specifies the column in the defined range that you want to return the value for. 4 。 2 -この番号を指定し、列を定義したい範囲の値を返します。 So in our example, on Sheet2, we want to return the value of Column B or the car name, once a match is found in Column A. Note, however, that the column’s position in the Excel worksheet does not matter.だから、私たちの例では、 sheet2 、私たちの列の値を返したいbまたは車の名前、一度a列にメモが見つかった、しかし、そのコラムの掲載順位は、エクセルのワークシートはありません。 So if you move the data in Columns A and B to D and E, let’s say, as long as you defined your range in argument 3 as $D:$E , the column number to return would still be 2.ですので、もしあなたのデータの列に移動してdとe aとbにしましょうと言う限り、お客様の範囲では、定義して引数3 $次元: $のeは、カラム番号を返すはまだ2 。 It’s the relative position rather than the absolute column number.それは相対的な位置というより、絶対列番号です。

5. False - False means that Excel will only return a value for an exact match. 5 。 虚偽 -誤ったということは、エクセルのみを返す値を正確にマッチします。 If you set it to True, Excel will look for the closest match.それをtrueに設定した場合、エクセルを探すのに最も近いマッチします。 If it’s set to False and Excel cannot find an exact match, it will return #N/A . falseに設定する場合は、厳密なマッチを見つけることはできませんエクセル、返すことになり n / 。

Hopefully, you can now see how this function can be of use, especially if you have lots of data exported out from a normalized database.うまくいけば、今から見てどのようにすることができ、この機能を使用することができ、特に多くのデータをお持ちの場合エクスポートしてからデータベースを正常化します。 There may be a main record that has values stored in lookup or reference sheets.あるかもしれませんが、メインの値を記録して保存されルックアップシートまたは参照します。 You can pull in other data by “joining” the data using VLOOKUP.データを引っ張ることができ、他の"参加"を使用してデータvlookupます。

Another thing you may have noticed is the use of the $ symbol in front of the column letter and row number.あなたも気づいては別のものを使用する $記号の前の文字列の行番号とします。 The $ symbol tells Excel that when the formula is dragged down to other cells, that the reference should remain the same.エクセルに$記号を指示したときは、公式引きずらダウンを他の細胞、そのリファレンスは変わりません。 For example, if you were to copy the formula in cell F4 to H4, remove the $ symbols and then drag the formula down to H9, you’ll notice that the last 4 values become #N/A.たとえば、数式をコピーしていた場合は、携帯f4キーをh4 、ドル記号を削除して、その後ドラッグして数式をh9 、ことに気づくでしょうから、最後の4の値になる# n / a.

The reason for this is because when you drag the formula down, the range changes according to the value for that cell.その理由は公式にドラッグしたときのためダウンし、変更の範囲によると、セルの値をしています。 So as you can see in the picture above, the lookup range for cell H7 is Sheet2!A5:B8 .表示されるようにすることができ、画像の上には、ルックアップのための範囲細胞h7はsheet2 ! a5を: b8ます。 It simply kept adding 1 to the row numbers. To keep that range fixed, you need to add the $ symbol before the column letter and row number.範囲を固定しておく必要があり$記号を追加する前に、コラムの行番号への手紙とします。

One note: if you’re going to set the last argument to True, you need to make sure that the data in your lookup range (the second sheet in our example) is sorted in ascending order otherwise it will not work! 1つのメモ:行く場合は最後の引数をtrueに設定して、必要なことを確認しルックアップデータが表示さ範囲( 2つ目のシートの例)は、並べ替えを昇順にするためそれ以外の仕事をされません!

Any questions, post a comment!不明な点は、コメントを投稿!

Technorati Tags: technoratiタグ: , , , , ,

If you enjoyed this post, make sure you この投稿を楽しんでいる場合は、必ず subscribe to my RSS feed 私のフィードを購読して !

» Filed Under下に提出» MS Office Tips msオフィスのヒント

Related Posts関連記事

Please post your comments/suggestions!コメントを投稿してください/ご提案!