{"id":31367,"date":"2021-02-12T10:58:48","date_gmt":"2021-02-12T09:58:48","guid":{"rendered":"https:\/\/blog.sheetgo.com\/?p=31367"},"modified":"2021-02-12T10:58:48","modified_gmt":"2021-02-12T09:58:48","slug":"vlookup-excel","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/excel-functions\/vlookup-excel\/","title":{"rendered":"Comment utiliser la fonction Excel VLOOKUP"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_row _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The <a href=\"https:\/\/support.microsoft.com\/en-us\/office\/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1\" target=\"_blank\" rel=\"noopener noreferrer\">VLOOKUP Excel function<\/a> is undoubtedly one of the most useful functions that Excel offers. It can also be one of the most confusing functions if you aren\u2019t familiar with it. In this article I\u2019ll show you that the VLOOKUP function is actually quite simple, and how to use it to work with your spreadsheet data in all sorts of situations.<\/p>\n<p>Essentially, the VLOOKUP Excel function searches for a value within a column, then returns a cell associated with that value (in the same row but a different column). This may sound confusing now, but I\u2019ll show a few examples that will demonstrate how easy it really is!<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Syntax<\/h3>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li><b>lookup_value<\/b> is the value you want the formula to search for<\/li>\n<li><b>table_array<\/b> is the array that contains your data<\/li>\n<li><b>col_index_num<\/b> tells the function which column to return a value from. For example, a value of 3 means the result will be from the third column of the table_array<\/li>\n<li><b>range_lookup<\/b> is an optional parameter that can be either TRUE or FALSE. TRUE will provide an approximate match to the lookup_value while FALSE will mandate an exact match. The default is TRUE, but you\u2019ll typically want to specify FALSE. I\u2019ll talk more about this later<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>How to use the VLOOKUP Excel function<\/h3>\n<p>Alright, now that the technical stuff is out of the way, I\u2019ll show you how to put this function to use. In the first example I\u2019ll show the function in its most basic form. I have a list of data from a department store, and I want to input the employee in cell E2 and have the spreadsheet automatically tell me their sales in cell F2. I do that with the formula <b>=VLOOKUP(E2,A2:C11,3,FALSE)<\/b>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/1.-VLOOKUP-basic.png&#8221; alt=&#8221;vlookup excel 1&#8243; title_text=&#8221;1. VLOOKUP basic&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.23.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>I\u2019ll break this example down so you have a full understanding of it before moving on. My lookup_value here is a cell reference to cell E2, where I\u2019ve typed the name \u201cDavid\u201d. I can type any of the employees\u2019 names here and the formula will automatically adjust and tell me their sales number.<\/p>\n<p>Next, I\u2019ve selected the table_array of A2:C11. This array encompasses all my data. I then type 3 as my col_index_num which tells the function to return the answer from the third column of the array. With a quick look at the array you can see that the third column contains the sales information that I\u2019m looking for.<\/p>\n<p>Finally, I enter FALSE as my range_lookup because I want the function to find an exact match with my lookup_value. I\u2019ll show the alternative to this in the next example.<\/p>\n<p>So to recap what the function is doing: it\u2019s taking my lookup_value (David) and searching for David in the first column of the table_array. When it finds David in row 5, it takes the value from the cell in row 5 and the third column in the array (which I instructed it to do when I typed 3).<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Approximate match<\/h4>\n<p>That first example dealt with an exact match. But what happens when I specify TRUE as the range_lookup? I\u2019ll demonstrate that here. For an approximate match, the function assumes that the data is sorted. It makes that assumption so that if it doesn\u2019t find an exact match to the lookup_value, it can estimate what an approximate match would be.<\/p>\n<p>In this example, I leave my data unsorted, which means that the approximate match won\u2019t work properly. I\u2019m doing this in order to demonstrate how it works, and then I\u2019ll show how to use it properly.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/2.-VLOOKUP-approximate.png&#8221; alt=&#8221;vlookup excel 2&#8243; title_text=&#8221;2. VLOOKUP approximate&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The formula I use here is <b>=VLOOKUP(E2,A2:C12,3,TRUE)<\/b>. Note that it\u2019s the exact same as in the previous example, except I typed TRUE instead of FALSE. Now what\u2019s happening here? Remember, the function assumes that the data is sorted, so when it looks for Daniel it stops at David because in a sorted dataset, Daniel should be before David. Because of this, it returns the value prior to David (Emily\u2019s sales) because that\u2019s where Daniel should be.<\/p>\n<p>In a sorted dataset, this might work alright. But when the data is not sorted, you can see that the answer here is completely wrong!<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Approximate match (with sorted data)<\/h4>\n<p>OK, now that you understand how the function finds an approximate match, I\u2019ll show how to do it correctly \u2013 with sorted data. In this example, I\u2019m sorting the data by sales.<\/p>\n<p>Note that I had to rearrange the columns because VLOOKUP can only search in the leftmost column.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/3.-VLOOKUP-approximate-sorted.png&#8221; alt=&#8221;vlookup excel sorted 3&#8243; title_text=&#8221;3. VLOOKUP approximate sorted&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The formula used here is <b>=VLOOKUP(E2,A2:C12,2,TRUE)<\/b>. Even though nobody had exactly $15,000 in sales, the VLOOKUP Excel function correctly finds the closest value, and tells us who had it (Betty with $14,149).<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Multiple lookup tables<\/h4>\n<p>You\u2019ve now seen a few basic examples of the VLOOKUP Excel function in action. For the majority of Excel users, that\u2019s all you really need to know.<\/p>\n<p>But if you want to see what else the function can do, take a look at this example with multiple lookup tables.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/4.-VLOOKUP-multiple-tables.png&#8221; alt=&#8221;vlookup excel mulitple tables 4&#8243; title_text=&#8221;4. VLOOKUP multiple tables&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In this example, the store pays out a bonus to employees based on their sales. However, the clothing department has a different bonus structure than the other employees. How can you use VLOOKUP to automatically give the correct bonus to each employee? I\u2019ve done it here by typing <b>=VLOOKUP(C2,IF(B2=&#8221;Clothing&#8221;,$F$3:$G$5,$F$9:$G$12),2,TRUE)<\/b>.<\/p>\n<p>The trick here is that I have not one but two different tables that I want the function to search, depending on the situation. So I include an IF statement within the <b>table_array<\/b> parameter. The IF statement instructs the function to look in the Clothing table for employees in the clothing dept. and in the other bonus table for the other employees.<\/p>\n<p>I added dollar signs ($) in the <b>table_array<\/b> because they tell Excel to hold those cells constant \u2013 so it doesn\u2019t change the arrays when I drag the formula down from the first cell.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Two-way lookup<\/h4>\n<p>Now I\u2019ll show you how to use VLOOKUP in a two-way lookup. In this example, I have sales numbers for both 2019 and 2020 for each employee.<\/p>\n<p>I can use the MATCH function to get the numbers from the year I want, with the formula <b>=VLOOKUP(G3,A2:D12,MATCH(G2,A1:D1,0),FALSE)<\/b>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/5.-VLOOKUP-two-way-lookup.png&#8221; alt=&#8221;vlookup excel two way lookup 5&#8243; title_text=&#8221;5. VLOOKUP two way lookup&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>I put the MATCH function in the <b>col_index_num<\/b> parameter because I want the column that I get the results from to be variable. <\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>VLOOKUP Excel tips<\/h3>\n<ul>\n<li>The VLOOKUP Excel function only looks to the right. So the column that you\u2019re searching needs to be the leftmost column. If you need to search another column and can\u2019t rearrange the data, you should check out how to use the <a href=\"https:\/\/www.sheetgo.com\/blog\/excel-functions\/index-match-excel\/\">INDEX MATCH combination<\/a>.<\/li>\n<li>The VLOOKUP function returns the first match it finds. So if you have duplicated data in the search column, the function will return results for the first match it finds.<\/li>\n<li>The function is not case sensitive so don\u2019t worry about upper- or lower-case letters causing mismatches.<\/li>\n<\/ul>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The VLOOKUP Excel function is undoubtedly one of the most useful functions that Excel offers. It can also be one of the most confusing functions if you aren\u2019t familiar with it. In this article I\u2019ll show you that the VLOOKUP function is actually quite simple, and how to use it to work with your spreadsheet [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":31369,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[65],"tags":[39,48,28],"class_list":["post-31367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-functions","tag-connections-t","tag-excel","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/31367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/comments?post=31367"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/31367\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/31369"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=31367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=31367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=31367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}