This article begins a series covering one of the most useful Excel functions - **VLOOKUP**. At the same time, it's one of the most intricate and least understood.

In this tutorial, I will try to explain the basics in a very plain language to make the learning curve for an inexperienced user as easy as possible. We will also explore some formula examples that cover the most common usages of VLOOKUP in Excel.

So what is VLOOKUP? To begin with, it is an Excel function : ) What does it do? It searches for the value you specify and returns a matching value from another column. More technically, the VLOOKUP function looks up a value in the first column of the specified range, and returns a value in the same row from another column.

In its common usage, Excel VLOOKUP searches through your data set based on the unique identifier and brings you a piece of information associated with that unique identifier.

The letter "V" in VLOOKUP stands for "vertical". It is used to differentiate VLOOKUP from the HLOOKUP function that looks up a value in the top row of an array (H stands for "horizontal").

The VLOOKUP function is available in all versions of Excel 2016, Excel 2013, Excel 2010, Excel 2007 and lower.

The syntax for the VLOOKUP function is as follows:

VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

As you see, the function has 4 parameters, or arguments. The first three parameters are requited, the last one is optional.

*lookup_value*is the value to search for.This can be either a

**value**(number, date or text) or a**cell reference**(reference to a cell containing a lookup value), or the value returned by some other Excel function. For example:- Look up for
**number**:`=VLOOKUP(40, A2:B15, 2)`

- the formula will search for the number 40. - Look up for
**text**:`=VLOOKUP("apples", A2:B15, 2)`

- the formula will search for the text "apples". Please pay attention that you always enclose text values in "double quotes". - Look up for value in another
**cell**:`=VLOOKUP(C2, A2:B15, 2)`

- the formula will search for the value in cell C2.

- Look up for
*table_array*is two or more columns of data.The VLOOKUP function always searches for the lookup value in the

**first column**of table_array. Your table array may contain various values such as text, dates, numbers, or logical values. Values are**case-insensitive**, meaning that uppercase and lowercase text are treated as identical.So, our formula

`=VLOOKUP(40,`

will search for "40" in cells A2 to A15 because A is the first column of table_array. Hopefully, everything is clear so far : )**A2:B15**,2)*col_index_num*is the**column number**from which the value should be returned.The left-most column in the specified table_array is 1, the second column is 2, the third column is 3, and so on.

Well, now you can read the entire formula

`=VLOOKUP(40, A2:B15,`

. It searches for "40" in cells A2 through A15 and returns a value from column B in the same row (because B is the 2nd column in the specified table array).**2**)

*range_lookup*determines whether to search for an exact match (FALSE) or approximate match (TRUE or omitted). This parameter is optional but very important. Further on, you will find a few formula examples showing how to Vlookup with exact or approximate match.

I hope vertical lookup is starting to look a bit more familiar to you. Now, let's build a few VLOOKUP formulas for real data.

In practice, VLOOKUP is rarely used to find data in the same worksheet. Most often you will have to look up and pull the matching data from a different sheet.

To do Vlookup from a different Excel sheet, you should enter the worksheet's name and an exclamation mark in the table_array argument before the range of cells, e.g. `=VLOOKUP(40, `

. The formula indicates that the lookup range A2:B15 is located in Sheet2.**Sheet2!**A2:B15,2)

Of course, you don't have to type the sheet's name manually. Simply, start typing the formula and when it comes to the table_array argument, switch to the lookup worksheet and select the range using a mouse.

The formula you see in the screenshot below searches for the text "Product 1" in column A in the "Prices" worksheet:

`=VLOOKUP("Product 1",Prices!$A$2:$B$9,2,FALSE)`

To perform vertical lookup between two different Excel workbooks, you should supply the workbook's name in square brackets before the worksheet's name.

For example, that's how you look up the number 40 in Sheet2 of the Numbers.xlsx workbook:

`=VLOOKUP(40,[Numbers.xlsx]Sheet2!A2:B15,2)`

If either a workbook name or worksheet name contains spaces or non-alphabetical characters, you should enclose them in 'single quotes' like this:

`=VLOOKUP(40,'[Numbers.xlsx]Sheet2'!A2:B15,2)`

The easiest way to make a VLOOKUP formula that refers to another workbook is this:

- Open both workbooks. This step is not obligatory, but makes it easier to write a formula because you won't have to type the workbook's name manually, thus preventing misprints.
- Start typing your formula, and for the table_array argument, switch to the other workbook and select the lookup range there.

In the formula you see in the screenshot below, the lookup workbook PriceList.xlsx and the lookup worksheet is "Prices".

Once you close the workbook with your lookup table, your VLOOKUP formula will work anyway, but it will display the full path for the lookup workbook, as shown below:

For more information, please see How to refer to another Excel sheet or workbook.

If you plan to use the same lookup range in several formulas, you can create a named range for it and type the name directly in the *table_array* argument.

To create a named range, just select the cells and type any name in the **Name box**, to the left of the Formula bar.

And now you can write the following formula to get the price of "Product 1":

`=VLOOKUP("Product 1",Products,2)`

Most range names in Excel **apply to the entire workbook**, so you don't need to specify the worksheet's name, even if your lookup range resides in a different worksheet. If it is in another workbook, put the workbook's name before the named range, for example:

`=VLOOKUP("Product 1",PriceList.xlsx!Products,2)`

Such formulas are far more understandable, aren't they? Besides, using named ranges can be a good alternative to absolute cell references. Since a named range doesn't change when a formula is copied to other cells, you can be sure that your lookup range will always remain correct.

If you have converted a range of cells into a fully-functional Excel table (*Insert tab* > *Table*), then you can select the lookup range using a mouse, and Microsoft Excel will automatically add the columns' names or the table name to the formula:

The complete formula may look similar to this:

`=VLOOKUP("Product 1",Table46[[Product]:[Price]],2)`

or even `=VLOOKUP("Product 1",Table46,2)`

.

As well as named ranges, columns names are constant and your cell references won't change no matter where the formula is copied within the same workbook.

Like in many other formulas, you can use the following wildcard characters with Excel VLOOKUP function:

*Question mark*(?) to match any single character, and*Asterisk*(*) to match any sequence of characters.

Using wildcard chars may prove really useful in many cases:

- When you do not remember the exact text you are looking for.
- When you want to find some word that is part of the cell's contents. Usually, the VLOOKUP function searches by the entire content of a cell, as if you selected the option "Match entire cell content" in the standard Excel Find dialog.
- When a lookup column contains extra leading or trailing spaces. If it is the case, you may rack your brain trying to figure out why the normal formula does not work.

Suppose, you want to find a certain customer in the below database. You cannot remember his surname, but you know it starts with "**ack**". So, you do a vlookup in this way:

`=VLOOKUP("ack*",$A$2:$C$11,1,FALSE)`

Once you are sure you've found the correct name, you can use a similar formula to get the sum paid by that customer. You only have to change the 3^{rd} parameter in the formula to the appropriate column index, 3 in our case:

`=VLOOKUP("ack*",$A$2:$C$11,`

**3**,FALSE)

Here a few more examples of VLOOKUP formulas with wildcard characters:

`=VLOOKUP("*man",$A$2:$C$11,1,FALSE)`

- find the name ending with "**man**".

`=VLOOKUP("ad*son",$A$2:$C$11,1,FALSE)`

- find the name starting with "**ad**" and ending with "**son**".

`=VLOOKUP("?????",$A$2:$C$11,1,FALSE)`

- find a 5-character last name.

And now, let's see how to look up a value in some cell when you know only part of it. Suppose, you have license keys in column A and license names in column B. You want to find a license name corresponding to some license key, of which you have only a few characters. Enter the characters in C1 (lookup value) and use the following formula to pull the License Name:

`=VLOOKUP("*"&C1&"*",$A$2:$B$12,2,FALSE)`

Please notice that we use an ampersand (&) before and after a cell reference in the 1^{st} parameter to concatenate a text string.

As you can see in the screenshot below, the VLOOKUP function returns "*Jeremy Hill*" because his license key contains the group of chars stated in cell C1:

And finally, let's have a closer look at the last argument of the Excel VLOOKUP function, *range_lookup*. Though optional, this parameter is highly important because you are likely to get different results depending on whether you supply TRUE or FALSE to the same formula.

For starters, let's see what Microsoft Excel actually means by "exact match" and "approximate match".

If range_lookup is set to FALSE, the formula searches for a value exactly the same as lookup_value. If there are two or more values that match the lookup value exactly, the 1st value found is returned. If an exact match is not found, the #N/A error is returned.

For example, if you use the formula `=VLOOKUP(4, A2:B15,2,`

, but value 4 is not found in cells A2 through A15, the formula will return #N/A.**FALSE**)

If range_lookup is set to TRUE or omitted, the formula will look up the closest match. More precisely, it searches for an exact match first, but if an exact match is not found, it returns the nearest match, which is the next largest value that is less than lookup_value.

To better understand the difference between exact match and approximate match, let's make a few more formulas and see what results they return.

As you remember, to search for exact match, you put FALSE in the last argument. Let's take the Animal speed table from the very first example and find out which animal can run 50 miles per hour. I believe you won't have any difficulties with figuring out the formula:

`=VLOOKUP(50,$A$2:$B$15,2,FALSE)`

Or

`=VLOOKUP(E1,$A$2:$B$15,2,FALSE)`

Where E1 is the value to look up.

Please note, our lookup range (column A) contains two "50" values in cells A5 and A6; and the formula returns a value from cell B5. Why is that? Because the VLOOKUP function with exact match returns the 1st found value that matches the lookup value.

When using VLOOKUP formulas with approximate match, i.e. with range_lookup set to TRUE or omitted, the first thing you need to do is sort the first column in your table_array in **ascending order**.

This is very important because your formula will stop searching as soon as it finds the nearest match smaller than lookup_value. If you neglect to sort your data properly, you will end up having really strange results or the #N/A error.

And now you can go with one of the following formulas:

`=VLOOKUP(69,$A$2:$B$15,2,TRUE)`

`=VLOOKUP(E1,$A$2:$B$15,2,TRUE)`

`=VLOOKUP(E1,$A$2:$B$15,2)`

Where E1 is the lookup value.

As an example, let's find the animal whose speed is closest to 69 mph. And here's what our vertical lookup has come up with:

As you see, the formula returns "*Antelope*" whose speed is 61mph, while we also have Cheetah that runs 70 mile per hour, and 70 is much closer to 69 than 61. So, why does it return "Antelope"? Because VLOOKUP with approximate match retrieves the closest value that is **less than the lookup value**.

Hopefully, these examples have shed some light on using VLOOKUP in Excel and this function is not alien to you any longer. Now it may be a good idea to revise the essentials to remember the key points better.

- The VLOOKUP function cannot look at its left. It always searches for the lookup value in the
**left-most column**of the lookup range (table_array). - Excel VLOOKUP is
**case-insensitive**, meaning that uppercase and lowercase characters are treated as equivalent. - If the lookup value is smaller than the smallest value in the first column of table_array, the #N/A error is returend.
- If the 3
^{rd}parameter (col_index_num) is less than 1, the #VALUE! error is returend. In case it is greater than the number of columns in table_array, the formula will return the #REF! error. - Always use
**absolute cell references**(with the $ sign) for the table_array argument to prevent it from changing when copying your formula to other cells. - When searching with approximate match (range_lookup set to TRUE or omitted), always have the data in the first column of table_array sorted in
**ascending order**. - And finally, remember about the importance of the last parameter. Supply TRUE for approximate match or FALSE for exact match, and it will save you a lot of headache.

Undoubtedly, Vlookup is one of the most powerful and useful Excel functions, but it's also one of the most confusing ones. To make the learning curve less steep, embrace the *Vlookup Wizard* included with of our Ultimate Suite for Excel.

The interactive wizard will walk you through the configuration options to make your own Vlookup formula based on the criteria you specify. Here's how:

- Select any cell in your main table, and click the
**Vlookup Wizard**button on the*Ablebits Data*tab, in the*Merge*group.

- The Vlookup Wizard will show up and ask you to choose your main table and lookup table. Additionally, you specify the following 3 columns:
**Key column**- the column in your main table containing the values to look up.**Lookup column**- the column to look up against.**Return column**- the column from which to retrieve values.

On a simple dataset, the wizard picks the column automatically based on the column headers. When you hover over a certain box on the right-hand pane, the corresponding element on the left-side diagram gets highlighted so you better understand what the wizard is doing:

- When finished, click the
**Insert**button. This will insert the formula into all cells of your main table:

That was easy, wasn't it?

What else can our wizard do that the standard Excel VLOOKUP cannot? It can look up **from right to left**!

As you already know, the Excel VLOOKUP function can only search in the leftmost column of a table. But sometimes you do need to pull values from left. To have it done, use an INDEX MATCH formula that does not care whether your lookup column is on the right or left side of the return column, or have our wizard build such a formula for you automatically :)

Here's an example of a right-to-left lookup in Excel:

Want to give it a try? A free 14-day trial version of the Ultimate Suite can be downloaded here.

If your Excel files are enormously large and complex, the project's deadline is imminent, and you are looking for someone who can lend you a helping hand, try out the Merge Tables Wizard.

This tool is our visual and stress-free alternative to Excel's VLOOKUP function. You do not have to invest hours to learn how to use it - the smart wizard will walk you through these 4 easy steps:

- Select your main table.
- Select the lookup table.
- Choose one or several common columns as the unique identifier.
- Define whether you want to update values in existing columns or/and add new columns to the end of the table.

Allow the Merge Tables Wizard a few seconds for processing… and here you go:

If this looks like a tool that may be helpful in your work, you are welcome to download a trial version.

If you like any of our tools decide to get a license, don't miss the 15% off coupon code that we've created especially for our blog readers: AB14-BlogSpo

In the next part of our Excel VLOOKUP tutorial we will explore more advanced examples such as performing various calculations with VLOOKUP, extracting values from several columns and more. I thank you for reading and hope to see you next week!

Excel formulas
Excel functions
Vlookup in Excel
Merge data in Excel
SumIf
Excel CountIf
Excel Compare
Excel If statement
Excel Charts
Pivot Table
Updates
Excel conditional formatting
Excel formatting
Excel time
Excel duplicates
Excel date
Excel tips
Excel macro
Outlook
Google Sheets
Outlook duplicates
Outlook templates

## 183 Responses to "Excel VLOOKUP tutorial for beginners with formula examples"

More vlookup function details

You can find more information about various aspects of Excel Vlookup in the links posted at the end of this tutorial.

Hi

Thanks for your valuable feedback.

Finding solution in a work sheet row's a1 b1 c1 d1..... Contained descriptions and same column have many part numbers. If a cell reference part number by matching index. description will be auto generated. please let me know if any formula is there?

Hi Madhu,

I think it will be easier for me to write the correct formula if I can see your sample data. If you can send me your workbook at support@ablebits.com and give an example of the expected result, I will try to help.

Hi Svetlana,

May I send you sample data sheet for vlookup formula.

Hi Svetlana,

Please help me I want to find value from 2 pairs of different columns in same sheet by inserting Vlookup formula.

Please suggest inputs.

regards,

Arjun Yadav

hi svetlana nice working excel working and as only work

i am freind and frankily

Hi Madam

i sent a mail ur mentioned mail id please find the mail .

Waiting for ur suggestion.

Hello Madhu,

Thank you for your workbook. I am sorry, we are overloaded with work at the moment. We'll try to look at your task as soon as we can.

EXCELLENT

WANT TO LEARN MORE FROM YOU..Its too good

With best regards

UDAY

The Most Important VLOOKUP function in MS Office (Excel). You can big database in find one person of the result. Thank You

How I use the VLOOKUP formula in the situation below,

for example;

5 4 4 3 4 4 4 5 5 4 5 2

the total number of 5 in this row is 4, how can I formula it so that I can use sum up a specified number in a row of more than 100 numbers or more?

Thank you.

Hello Angel,

Please use the SUMIF and COUNTIF functions:

=countif(A2:A100, 5)

=sumif(A2:A100, 5)

Where A2:A100 is the column with numbers, 5 is the number you want to count / sum.

You can find more information about the COUNTIF function in this article:

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/

Thanks, excellent example

I had tried it, it is EXCELLENT

Thank you.

Thank you for the tutorial on using Vlookup with a separate workbook!

Thank for ur introdution of vlookup

Hi, first of all, thanks a lot for giving us these tips and explanations, they are very useful.

What if I want to find a value that is not on the first column? On the Speed/Animal example, what if I want my Vlookup formula to find the value Antelope so it will show me that animal's speed instead of doing it the other way around.

I have 2 different sheets, I want to be able to create a Vlookup formula on sheet #1 that will allow me to match a value that is on the H column of the 2nd sheet and I want it to give me the value on the column E of the same sheet (I cannot change what's on the 2nd sheet). I tried something like =VLOOKUP(B8,NOMINA!A:H,5,FALSE), but it doesn't work.

Hello Rosie,

Because Excel VLOOKUP cannot look at its left, it cannot return a value from a column located to the left of the lookup column. In this can you can use an INDEX / MATCH formula like this:

=INDEX(NOMINA!E:E,MATCH(B8,NOMINA!H:H,0))

Where B8 is the lookup value, column E in NOMINA sheet is the lookup column and column H in the NOMINA sheet is the return column.

For more details about using INDEX MATCH as a more flexible alternative to VLOOKUP, please see this tutorial:

https://www.ablebits.com/office-addins-blog/2014/08/13/excel-index-match-function-vlookup/

Actually the returned is column E in the NOMINA sheet and column H is the lookup column

2 coloum common vlookup actually I need to compare with booking with stock what I am having. Kindly help me. eg : In sheet1 bookings & in another sheet2 stock. model wise colour is common for both sheet. I need to arrive against stock the booking of the customer name.

Please help me

surekha

Hello Surekha,

The solution for this task is described in the following articles, hopefully you will find them helpful:

https://www.ablebits.com/office-addins-blog/2014/07/29/vlookup-formula-examples/#vlookup-multiple-criteria

https://www.ablebits.com/office-addins-blog/2014/08/13/excel-index-match-function-vlookup/#lookup-multiple-criteria

Hi

I have a date in dd/mm/yyyy HH:MM:SS (26/11/2014 01:51:08)formatt, I want to use a wildcard vlookup. I tried =vlookup("26/11/2014*", etc etc.

But no joy, can you help?

Thanks

Matt

Thanks very very very much for your good information ms excel. I want to learn form u more and more from u thanks and regards sham india please send more tips on my email

hi i am unable to understand this and i am new to this vlookup can you help me out of this problem. ple....Svetlana Cheusheva

Hi,

I have an issue where in sheet 1 I have different no like

1

2

3

4

5

6

and I have to put data from 2 different sheet which have

2

4

6

in sheet 2

1

3

5

in sheet 3

so what single formula we can use so that data can be come in sheet 1 from sheet 2 and 3

pls suggest

Hi. Hope you well.im struggling to get resolve the problem with my vlookup. It continues show #NA. Can i please e-mail the workbook to you? I urgently need help and need to know how to avoid this in problem in the future. Many thanks.

Hi Chica,

Our season holidays have already started, that is why we won't be able to look at your sheet until Jan 2015, I am really sorry.

In the meantime, please have a look at the following article that explains all possible errors with VLOOKUP and the ways to fix them:

https://www.ablebits.com/office-addins-blog/2014/08/27/excel-vlookup-not-working/

For problem 2 of the vlookup examples how would one go about figuring that out? I understand it's something like vlookup("Jamie"&"Jackie,$B$5:$E$17... but I'm lost from there. How do you compare the two values to come out with the higher value?

Hi! I have a list of weeks that gets refreshed periodically, like:

2015|05 (2)

2015|06 (3)

2015|07 (4)

2015|08 (5)

2015|09 (6)

and so on. And I want to make a vlookup reference to them, but on my other table the dates get refreshed with a little difference, like:

2015|05 (11)

2015|06 (12)

2015|07 (13)

How can I make the reference work? Because I tried to make the range_lookup cell TRUE (an approximate match), but then the result is not correct.

Thanks a lot!

I have two workbooks. Workbook "A" has been completed and now contains questions and the responses of the Interviewee. Workbook "B" contains a number of additional cells which are the bases of the final report to management. I constructed "VLOOKUP" code to pull questions entered in Workbook "A" and pace them in the appropriate column in Workbook "B". What I want is this to happen only once when Workbook "B" is opened. Can I do this using just formulas or do I need to use VBA code?

When I type in a vlookup formula, the cell shows the formula not the result?

What am I doing wrong here?

Hello Tim,

Please make sure you enter the equals sign before the formula, e.g.

=VLOOKUP(40,Sheet2!A2:B15,2)

Tim,

Most likely you have inadvertently activated the Show Formulas mode in your worksheet. To turn it off, press the CTRL+` shortcut. If it's not the case, check out other possible reasons and fixes: Why is Excel showing formula, not result?

My query:

I have two column A & B each had got 10000 entries , A is original and B is typed in. I want to find error in B by comparing both column A & B

Entries e.g. 1-721-95-43

Please reply with result oriented solution

Regards,

Afzaal

My Query

I have 12 sheets in a work book. I wanted to consolidate all the entries in all the work sheet in one sheet through vlookup.

Please reply with result.

Regards

dhanuskodi

Hi

How can I use vlookup formula using with OR function?

I have more than 40000 line items from which I have to match the data using vlookup and in some cases cells having error eventhough the data is lying in main table.

Pls help me.

CA Nishit Shah

Hai

I have a problem.

I have two work books. One shows part no and price in different columns. Another work book where I prepare quotations. Is there any formula, so that when I enter the part no in the quotation work sheet, price will be automatically come in the price column of the quotation work sheet

how to use vlookup for sheet 1 to worksheet same row with one colom.

Hi, I have this problem

Pers # Surname FullNames Job Titles

k15126 Abure Data Moses Security Officer

in another sheet2 i have

Pers # Surname FullNames Job Title Start Date

k15126 Abure Data Moses Security Officer 2015-10-02

I want to vlookup start dates in sheet 2 to include in sheet1 to match their pers # Surname FullName and Jobe Titles

Help

Hi,

May i know how to lock vlooklup target to different workbook.

Example:Its alwasy lock to Numbers.xlsx

=VLOOKUP(40,[Numbers.xlsx]Sheet2!A2:B15,2)

Hi Jemi,

Simply change the workbook name [Numbers.xlsx] and the sheet name Sheet2! to different names. If you do Vlookup within the same sheet, you don't need to specify either the workbook or worksheet name.

Hi Svetlana,

Thank you for you replay.There is 2 different Workbook.

Here the condition in Workbook1

=VLOOKUP(M7,[ECA_partslist.xlsx]vlookup!A1:AF15,2,FALSE)

Workbook2: ECA_partlist.xlsx, There is 2 tab sheet in this book name 'PartList' & ' vlookup'

The situation is,the condition will auto add path if the ECA_partslist.xlsx open in different location with Workbook1 for example:

=VLOOKUP(M7,'Z:\Project\SO201504081701 Willowglen\[ECA_partslist.xlsx]vlookup'!A1:AF15,2,FALSE)

I add abit here,

Its happend when I save the Workbook1 in different location with Workbook 2(ECA_partlist.xlsx. Not only the vlookoup path effected but 'Name Manager' refer to also will add the path.

I have two values Male and female. I want to create a fomular that adds either of them. Say everytime I add M, it aggregates it to 1, 2, 3, 4, 5 to nth value. can someone help.

Thank you.

I have two Workbooks that I need combined. On the first workbook (Workbook 1) I pull data from a website that has about 500 names in Column A (along with other data corresponding to the person in the row). I have another Workbook (Workbook 2) that I have different comments (Column E) on the person in Column A. Am I able to pull the new data for Workbook 1 and add the comments from my old Workbook 2 to the first blank Column (Column I)? Every time I pull the new info on Workbook 1 some of the names change so I can't just cut and paste the entire column.

Hello Matt,

This is exactly what the VLOOKUP function does. Enter the formula into column I of workbook 1 to pull the corresponding comments from Workbook2, e.g.:

=VLOOKUP($A2,[Workbook2.xlsx]Sheet5!A2:E26,5,FALSE)

Clear, step by step and with examples. An excellent tutorial!

Hi Svetlana,

In excel , I have selected a cell(b1) and made it a dropdown list.

Also i have created a table(Table2) AT Sheet1!$H$6:$J$8 -> This table contains information like type(H) tool(I) and version(J).

Note that version column contains dropdown list mentioning version no.s present.

Also note that the list in b1 is pointing to table_column(H) (eg. by using data validation src=table2)

Now my requirement is when i select a value at b1 from the list, then a new Field has to be entered in a2 with the values of the table_columns (I & J)

I have got partial answer by using =VLOOKUP(B1,Table2,3,0), but as i said its not giving the drop down list in a2 its just giving the value same as in table.. I want drop down list in a2 by the above formula

Hello,

I have two sheets one sheet has entire data with values & another sheet has selected items which doesn't have any values. i want put the values which selected items.

For Example:If clothes value is $ 10 in existing sheet. and selected items felter with clothes and i want to put the value 10. how can i do this by using vlookup or any other formula?

Hello Imran,

Could you please send a test worksheet to support@ablebits.com and point us to one row with the expected result? We'll do our best to assist you.

WOW!

Lots of learning while reading the Q & A.. *clap*

thanks man, i was going nuts over this. ur solution helped. just needed to click false on range lookup

Awesome! I think this should be added to your page on troubleshooting why the VLOOKUP doesn't work. Can't believe they set the default to approximate match.

THANKS!!!!

My spreadsheet has a field containing a drop-down list for Part category. In the field next to it, I have a drop-down list for SubCategory. When I select a sepecific Part category, I would like the SubCategory pull-down list to ONLY contain the pertinent subcategories for the Part Category selected, not everything in the SubCategory list. My SubCategory tab containing the items for the drop-down list holds the Subcategories in one column, and the Category to which the SubCategory is pertinent in the adjacent column.

What is the best way to have ONLY the Subcategories for a specific Part Category to be displayed in the SubCategory drop-down list without having to make a separate set of lists for each part category?

Hello Chuck,

When creating a drop-down list for the SubCategories, go to Data -> Data Validation, select List and instead of entering the list name in the "Source" field, use the INDIRECT function to reference the value in the cell with the Part Category, e.g.:

=INDIRECT($H2)

You will need to have named ranges for categories and subcategories. The name of the range with Subcategories must coincide with the value selected as the part category. E.g. If you select "Subcategory1" as your Part category in cell H2, then you'll get the "Subcategory1" drop-down list in I2. If this doesn't help, please send a test spreadsheet to support@ablebits.com, we'll do our best to assist you.

Thanks very helpful lession

No doubt your site is very helpful, especially for beginners like me.

hello excel i am working in a school i have to maintain daily register of cash collection and total amount is to be divided into different heads like tution fee exam fee bus fee i want that formula that itself divide that amount into different heads of different class

Hello Sameer,

Could you please send a test worksheet to support@ablebits.com and describe your task and the expected result in more detail? We'll do our best to assist you.

Hi, what should I should I input if the look_up value is a text. Thanks

Hi Jo,

You should input that text in double quotes, e.g.

=VLOOKUP("apples", A2:B20, 2)

I ve this formula =VLOOKUP(D7,INDIRECT(""&G9&"!B7:AL32"),2,0). I want add hyperlink in this formula as a vlookup result how?

Hello Pravin,

Could you please describe your task in more detail? Are you trying to add a hyperlink with the lookup value as the "friendly name"? If possible, please send a test spreadsheet with the description of your data and the expected results to support@ablebits.com.

We'll do our best to assist you.

have two columns in a single work sheet and I want to use VLOOKUP formula (I do not want to use MATCH Formula) to compare these two columns each other and get an output of Matching Items.

1202 16003

1206 16010

16003 21307EXQW33

16010 21307EXQW33C3

21307EXQW33 1202

21307EXQW33C3 1206

22206EXW33 22210EXQW33

22210EXQW33 22215EXW33KC3

22215EXW33KC3 22206EXW33

I want to get :

1> Compare and give teh matching output.

Hello Anil,

You can use VLOOKUP formula, e.g. =VLOOKUP(A2,$B$2:$B$11,1,FALSE), but it will simply display the value if it occurs in your lookup column.

If your task is to see whether or not value in column A is repeated in column B, you can use the following formula:

=IF(ISERROR(VLOOKUP(A2,$B$2:$B$11,1,FALSE))=FALSE,"duplicate","Unique")

I hope this helps.

how did four sheet use a Vlookup why Formulas

Hello Hanmant,

Could you please clarify your question? If you are not sure if the VLOOKUP function does what you need, please describe your task. We'll do our best to assist you.

Why while using vlookup function #NA# results if the value does exist

Hi Monika,

Because it is designed by Microsoft this way. If you'd rather display a blank cell or some message when a lookup value is not found, you can enclose your Vlookup formula in the IFERROR function:

=IFERROR(vlookup(), "")

You can find an example of a real-life formula with the detailed explanation and screenshots in this tutorial: Why Excel VLOOKUP is not working

In doing the vlookup here is my fomula,=IF(ISERROR(VLOOKUP(D2,F2:F80833, 1, FALSE)),FALSE,TRUE) and I am trying to repeat the formula where D2 changes on the next cell to D3 and so forth to D92563 but I do not want the second portion of my formula F2:F80833 to change. I cannot click and drag because it will change the 2nd portion of my formula to match. What do I do to copy portions of the formula?

Hello Jerry,

You can add a dollar sign before the column and row references to make them absolute:

=IF(ISERROR(VLOOKUP(D2,$F$2:$F$80833, 1, FALSE)),FALSE,TRUE)

This will keep the range invariable when you copy the formula.

Hello,

I'm using the lookup function and it's behaving oddly: it won't find any text string in one column that starts with P to Z. I have no idea about this! Thanks!

Hello Stephen,

Please see the following blog post that describes practically all possible issues with the VLOOKUP function:

https://www.ablebits.com/office-addins-blog/2014/08/27/excel-vlookup-not-working/

If none of the solutions help, please send your Excel file to support@ablebits.com and include the link to this blog post and your comment number.

We'll do our best to assist you.

Hello,

What is the formula to compare the exact numbers in two sheets.

I would like to compare the data in two sheets and find out a exact matches / numbers.

Eg: In Sheet1 : Column A: 2352,25897,25666,29981

In Sheet2 : Column A: 29981,23514,2352,25555,25369

Thanks,

Sanju

Main Table: Bill of matrial 1

Colorants Green Orange Maroon Colorants Green

Lemon Yellow 80.00 75.00 Lemon Yellow 68.00

Ochre Ochre -

Bright Red 25.00 60.00 Bright Red -

Brick Red 20.00 Brick Red -

Sky Blue Sky Blue -

Navy Blue 20.00 20.00 Navy Blue 17.00

TOTAL: 100.00 100.00 00.00 TOTAL: 85.00

We have generated "Bill of material 1" from Main Table. In Table "Bill of material 1" we do not need zero value or blank cell. Instead we want Table to show initial three rows with data.

In this we apply formula:

=INDEX(B$4:$B$9,MATCH(F5,$A$4:$A$9,0),MATCH($G$3,$B$3:$D$3,0))/$B$10*$G$10

Kindly help to update formula.

Regards,

Waseem.

This text area does not support formatted Excel data. Please improve to explain question properly.

Kind regards,

Waseem

I have been learning excel from the internet and this is best website on he subject!

I just found out that sometimes when looking for EXACT match, and the cell is a number, there could be some rounding off errors. Then #N/A is shown even though the table shows that there is a match.

Holy crap! I just had to say thank you for the =VLOOKUP("*"&A1677&"*",'QEP BOLO CONTRACTS'!$B:$T,3,FALSE) formula!

The "*"&A1677&"*" Saved my spreadsheet!

=E391*(1+VLOOKUP($D391,$C$12:$AJ$15,COLUMNS($C$12:F$12)))

What does this mean? Why the 1+ Many thnks

hi i was in an interview yesterday and i couldnt even do vlookup and pivo table can u please help me

hello

please tall me , How to work in two book .

I need a

I doing some work in book 1

like a

123 - shri - India - lovely person

and I am open new book (book-2)

when tipping 123 and a take all information of Shri

plz help me

Hi All ,

I am facing a serious problem as per below , would you mind to assist please ?

Sheet1 ( called Physical consumption) has four columns : Date , job number , Part Number Quantity Representative

Sheet 2 ( called system consumption) as lot of columns , but below are the most important I am working with :

Date , part Number reference

The problem is : I want to use a formala that helps me to add on the last column on sheet1 that pick up the refence number in column 2 and had it to a specific part number on the same date as the sheet 2 .

Thanks for your assistance

Dear Svetlana and Irina,

Can you please explain why vlookup does not work when it is used to get data from a named range in an external workbook ?

Hello Moe,

It should work if you include the name of the workbook where you have the named range, e.g. [workbook name]!NamedRange

please can you help me with a formula

i have 3 columns a,b,c

a column have 300 products codes

b column have 50 products codes these codes appear also in column a

c column have prices for product codes in column b

i need to insert a column next to column a and want all the prices from column c that matches the product code from column b to a anything that does not

match a blank cell should come up

Hello

how can i do a vlookup in the same sheet

i have sheet wherein 10 site has sold same 10 article .. how do get the data from that sheet . which formula should i use to get the data.

Hello Sunil Tripathi,

For us to be able to assist you better, please send us a small sample table with your data in Excel and include the expected result. Thank you.

Row Labels Article Article Description Sum of Qty in Un. of Entry Sum of Sales Value inc. VAT

3478 108007941 CLMT UTENSIL BAR 200G -4 -60

3497 108007941 CLMT UTENSIL BAR 200G -7 -105

3503 108007941 CLMT UTENSIL BAR 200G -2 -30

3506 108007941 CLMT UTENSIL BAR 200G -8 -120

3530 108007941 CLMT UTENSIL BAR 200G -2 -30

3532 108007941 CLMT UTENSIL BAR 200G -2 -30

3550 108007941 CLMT UTENSIL BAR 200G -1 -15

Thank you for this! It was very helpful and easy to understand!

Hi Svetlana Cheusheva,

I have a file with more than 20 sheets (Departments) and a major file where the rest of the sheet get the data from. I have use a simple way of getting the data from the main file by typing =sign and the the main sheet and last the cell that contains the data i want to appear in departments. This was working well untill i realized after i sort the data in the main file, the departments data get messed up coz am referring to a cell but not the content in it. Is there a formula i can use in a way that if is edit the main file, the changes are reflected in the departments file?

First of all thanks for nice and very useful information sharing.

I want to make database for my shop. In which I want to make one "Inventory" sheet second "Stock in" sheet third "Stock out" sheet. Now question is that how inventory sheet automatically update with transaction from both stock in and stock out sheet. for example I have 5 Energy savers in my inventory. I add 2 more and sold 3 then the inventory sheet automatically update as(5+2-3=) 4 energy saver in stock.

Thanks in advance.

I have the following problem that I d not have idea how to create the formula in Vlookup.

Create a vlookup which will populate the list of projects to be selected based on the following criteria

1. Budget of $4,000,000

2. Populate the Include column to indicate what projects should be selected, based on the project in each region with the highest NPV while staying below the total budget constraint

Region Project Cost NPV Include

Europe 1 $1,200,000 $172,036

Europe 2 $2,000,000 $362,283

Europe 3 $500,000 $147,487

Asia 4 $600,000 $72,076

Asia 5 $700,000 $129.35

Asia 6 $3,000,000 $527,127

Asia 7 $1,500,000 $343,632

Africa 8 $200,000 $52,836

Africa 9 $2,400,000 $275,936

Africa 10 $1,000,000 $175,824

Total

Constraint 4,000,000

Private Sub Program4()

Dim LastRow As Long

Dim LastColumn As Long

Dim i As Integer

Dim j As Integer

LastRow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row

LastColumn = Sheets("Sheet1").Cells(1, Columns.Count).End(xlToLeft).Column

For i = 2 To LastRow

For j = 1 To LastColumn

Sheets("Sheet2").Cells(i, 2) = Application.VLookup(Sheets("Sheet2").Cells(i, 1), Sheets("Sheet1").Range("A2:D7"), Sheets("Sheet1").Cells(i, 4), False)

Next j

Next i

End Sub

Above example i have an error..What that error is?

Task is:using two variables and lastrow and lastcolumn by using for loop in vlookup..

task:Sheet1 Sheet2

Id Name Salary Dep Id Dep

1

Thank you so much!!!

extremely helpful

SIr/Maim

I m facing some problem to apply matching formula in worksheet...

may u help me,,,,,

I need to compare to columns and highlight cells in column A when a match is not found in column B.

I am using Excel 2010. Do you have an example that will work to accomplish this. I will also need to compare the columns in reverse. Highlighting in column B and cells not found in column A.

I need to compare two work books in that one sheet have number of same site id's in column 'A' but description is different then how can i do that,it shows the wrong data why because same id's repeated that's why it shows the wrong data.

a b c d g

49314 Watch 49314 WT00009303

49314 Watch WT00009303

49314 Watch WT00009303

49394 Watch 49314 WT00009303

vlookup a & c and pick d in g

suppose i have list of data in different worksheets sheet 1, sheet 2, sheet 3, sheet 1 consists of data up to 1-100 sr. no. sheet 2 101-200 sr. no. and sheet 3 up to 201-300 how can i lookup all at once using vlookup i shows me value error when i trying to select all data from all worksheets

I can do vlookup now. thank so much for the simple explanation.

This is very helpful.

I appreciate your site.it is very informative.

Vlookup(value,range,col_index)

In above formula I want col_name in stead of col_index.

With best regards

Hello Khurram,

You can use the Match function to create a dynamic column reference. The detailed explanation and formula examples can be found here: Excel Vlookup and Match

How to do work vlookup From another excel sheet1 & sheet 2

Hello!

Simply include the sheet name in the table_array reference, as explained in Vlookup from another sheet. For example:

=VLOOKUP("text",Sheet2!$A$2:$B$10,2,FALSE)

I am trying to add amounts from one column AB, if in column L there is text that contains (G).

How do I write this formula?

The (G) is not always written in the same exact place. It can be in the front of a sentence, middle, or end.

So basically need if:

Column L has (G) then add the amount from column AB.

and the (G) is written this exact way, so its throwing me off on how to write the formula since it also has parentheses.

Thanks

I created an Excel spreadsheet that used VLOOKUP formulas, with version 2007. I wanted to update it, so I recreated it by copying it to my Excel 2013 version. Everything seemed to work fine, except for one item. When I try to insert a row into the database (Sheet 2) and create a new look up item in my inventory, it returns an "NA" response on Sheet 1. I tried to figure it out, and it seems that it may be because of a previous link to the 2007 version that is not there now. I tried to Edit/Delete or Break the link, but it still doesn't work. Can you help please?

Hello, Lynn,

we will be able to help you if you send us a small sample workbook with data source and the result you want to get to support@ablebits.com. We will take a look at the data and get back in touch. Don't forget to link this article and your comment.

what's the function to calculate Unit Number?

Excellent tutorial, explained each and every steps clearly with good examples.

I salute you !!!!👍🙏

How to find out data is in one column but not in other column?

in vlookup what if there's two or more same data in column of table array?

Hello, Mike,

That would be another level of VLOOKUP. You can read how to find the follow up occurrences in this article of ours.

Hope it'll help!

Hi Mike,

The Excel Vlookup function returns the first match found. If you want to get all occurrences, then you will need to use a more complex array formula as shown in How to Vlookup to return multiple matches in Excel.

HOW TO RECONCILE TWO DIFFERENT SHEETS HAVING SIMILAR DATA.

Hello Team,

is there any formula to pull 2 different name from 2 same code?

for exp:-

125 - jack

126 -Jorge

125 -Rick

now i have 2 code and i want 2 different name

125 - required (jack)

125 - required (Rick)

(is it possible that i can sum amount of multiple cell by search of single name).

Worth reading.

hi

1747

10047

1008

10087 ITHIS SITUATIOPN HOW CAN I MAKE SORTING SMALL TO LARGE

10087-22

1747-33

10047-45

10008-55

10099-66

IN THIS SITUATION HOW CAN I MAKE SORTING BY NUMBERS

item number shoe type price

583 kitten heel $57.00

612 mules $40.00

471 platforms $30.00

982 pumps $45.00

773 sandals $37.00

156 slingbacks $48.00

229 stacked heel $70.00

312 stiletto $85.00

823 wedge $35.00

lookup value for kitten heel:

lookup price for item number823:

lookup shoe type for item number 471:

how can i find the formula for each of this problems

Hello, Josh,

if your table starts from A1, you can use try the following formulas for every lookup you indicated:

=VLOOKUP("kitten heel",B2:C10,2,FALSE)

=VLOOKUP(823,A2:C10,3,FALSE)

=VLOOKUP(471,A2:C10,2,FALSE)

Hope this helps!

thanks for that

A B C

name age seating

ishan 33 balcony

behoora 34 floor

Adam 51 podium

smith 42 balcony

I J

name seating applicable

Adam podium

ishan balcony

greg #N/A

HERE IS WHAT I USED TO FILL IN COLUMN J BUT WANT TO PUT IN "DID NOT ATTEND" WHERE THE #NA CAN'T QUITE FIGURE IT OUT WHERE TO PUT IN STATEMENT

=VLOOKUP(I2,$A$2:$C$5,3,FALSE)

you are really cute.

Thanks too match it is very useful for my

You are the best one in word

i love your write but i have no knowledge of vlookup at all. so i find it difficult to understand it. please help me to understand this by sending me more write up on this please. thank you.

Hi I am using a Vlookup and it is returning formula however I now want to do a vlookup against the first vlookup I did, I have done this but a very long time ago and cannot remember, I basically need to use the value from the first lookup to drive another look up.

Thanks

These are the looks up I tried

No 1 =(VLOOKUP(C14,'Data '!A:B,2,FALSE)) - this returns what I want

No 2 =IFERROR(VLOOKUP(D14,'Score sheet'!A3:B103,2,FALSE),"") - This doesn't return what I need.

Thanks

I need no 2 to look up against what has been returned in look up no 1