All courses available in-class or via remote login

Tips To Troubleshoot VLOOKUP in Excel

Tips To Troubleshoot VLOOKUP in Excel

May 12, 2017

Whenever you type “how to use VLOOKUP” in Google, you are faced with hundreds of blogs and pages trying to explain how to use VLOOKUP.

The issue is, these blogs just explain how to use the function in an ideal scenario, when lists are clean and tidy and you’re not faced with real life issues.

The Importance of VLOOKUP in Excel

However in reality, things are not that straight forward and if you’re reading this blog, I assume you have been faced with some challenges while using this function. Files on which we routinely work are usually massive. Not to mention filled with spelling mistakes, garbage values, blank spaces, incorrect formats and duplicate entries which can lead to incorrect values and bugs.


In this blog, we will troubleshoot the most common mistakes made while using VLOOKUP and provide some quick and easy solutions.

Error #1 - There’s no match

 

The VLOOKUP functions work by matching the “Lookup_Value” with the first column of the “Table_Array”. This way you can perform a vertical lookup by searching for a value in the first column of the table and returning the value in the same row in the “index_number” position.

If you search for something and there’s no match, you will get the following error message:

(#N/A)


However, sometimes the match you are looking for is there but the function is just failing to find it.

There are a couple of reasons why this may be happening…

  • Watch out for non-printable characters such as spaces.
  • There may be inconsistency in Cases of both the strings. e.g. One
  • Check the formatting. For example, numbers formatted as texts. This can happen when you import data from a database.
  • There may be special characters such as (- / : ;) within the string – especially if you’re working with long codes.


So, before you dive in it's recommended you take some steps to clean out your functions.


Use the Trim Function

This helps to remove unnecessary spaces between words in a string.

  • Use Clean function to removes all nonprintable characters from a string
  • Use Upper, Lower and Proper function to makes cases of both strings consistent.
  • Clear the formats of the matching columns.
  • Use find and replace function to clear all special characters (- / : ;)

If the error is still there…

  • Ensure 1st column of your Table_Array contains the Lookup_Value
  • Ensure you have locked your Table_Array (F4 key is used to lock it)
  • Ensure your Table_Array is arranged in ascending order if you’re using approximate match (Range_Lookup = TRUE)

 

Error # 2 – Incorrect Values

One of the most difficult errors to detect is the one when your function works perfectly fine but continually returns incorrect values.

This error can occur when you have duplicates in the “Lookup_Value” column.

Function picks up a Lookup_Value, reiterate from the top of the first column of Table_Array, returns the value when it finds the first match and then jumps to next Lookup_Value. Hence, same value is returned for all the duplicates.

This brings us to a conclusion that our Lookup_Value column should have a unique identifier.


Here’s the Solution:

If you don’t have a unique identifier it is simple enough to create one.

For example:

If you “Lookup_Value” column comprises of just the first name than there is an increased chance of duplicate values. Not everyone has the same name but some people do!

Instead, combine the first name with the last name to create the full name.

Now you will have a much more unique identifier and at the same time reducing your chance of duplication!

Additionally, use below option to highlight all duplicates before you start working on your function

Home Tab > Styles Group > Conditional Formatting > Highlight Cell Rules > Duplicate Values

So, that either you can delete them, or combine them.

Contact Us

What is Remote Training?

Valued by Individuals

4.8/5
Over 22993 Reviews
good -Project Beginner Perth
Marc - Project Beginner, .
Very Detailed course, worthwhile completing. Challenging to follow at times when doing externally (internet dropping out etc.) -Project Beginner Perth
Michael - Project Beginner, .
Thanks Dom! A great course, lots of information to take in and think about how it can be applied in our company. -Project Beginner Perth
Alana - Project Beginner, .
Course was very informative and only three attendees so had the teachers attention -Project Beginner Perth
Anthony - Project Beginner, .
Michael was a knowledgeable presenter and patient with class questions -Power BI Beginner Parramatta
John - Power BI Beginner, .
The teacher was great. Thank you. -Power BI Beginner Parramatta
David - Power BI Beginner, .
Jason was a very calm, considerate and knowledgeable trainer. I have learned many things to do with PowerBI and some features in Excel. I will further investigate in Microsoft lists with PowerBI. I especially liked the use of slicers and timeline slicers. Thank you! -Power BI Beginner Canberra
Rochelle - Power BI Beginner, .
This was a very useful course, and very kindly tailored to meet our needs, as we went along! Ken was knowledgeable and flexible. -Office 365/SharePoint Remote Online
Jenny - Office 365/SharePoint, .
Our trainer was John Bates, he was great; everything was explained in full, questions were welcomed, he took the time to listen and help if we got stuck. Was a great session -Excel Intermediate Remote Online
Madison - Excel Intermediate, .
Informative, well-paced Excited to start using Power BI -Power BI Beginner Canberra
Karen - Power BI Beginner, .
Trainer has a good understanding of the tool and had kept us engaging. -Power BI Beginner Canberra
Sricharan - Power BI Beginner, .
Great course with a wealth of knowledge. Doing it online was difficult over a full day. -Excel Intermediate Melbourne
Helen - Excel Intermediate, .
Thanks Ken, an enjoyable session, you customised the training for our needs and you answered all our questions well. -Office 365/SharePoint Remote Online
Atul - Office 365/SharePoint, .
Great trainer - really patient and thorough. This will be so valuable for my work, particularly the slicer and insights functions. -Power BI Beginner Canberra
Kelly - Power BI Beginner, .
Slicers Power BI Service -Power BI Beginner Canberra
Alarka - Power BI Beginner, .
A high value relevant course delivered in a professional way. An excellent beginner course. -Power BI Beginner Canberra
David - Power BI Beginner, .
Fantastic session - very informative. Learnt lots of new Excel 'tricks'. Jagg was very thorough and ensured we understood what he was explaining. -Excel Intermediate Remote Online
Robyn - Excel Intermediate, .
Very informative. Jagg had great knowledge and was a great presenter. I have learnt alot of valuable skills I can use in everyday work. -Excel Intermediate Remote Online
Jessica - Excel Intermediate, .
Jagg has been great :) -Excel Intermediate Remote Online
Syeda - Excel Intermediate, .
Great for a Teams training excerise. -Excel Intermediate Remote Online
Viviana - Excel Intermediate, .

Trusted by Business

Procured by Government

Map of Australia