October Sale - 20% of all courses - Book Today

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 23577 Reviews
Excellent training course really filled in the gaps for me as a SharePoint administrator -SharePoint Site Owner Brisbane
Kristy - SharePoint Site Owner, .
Great course with very useful content. But also made me realise that Sharepoint is a massive tool with endless capabilities. -SharePoint Site Owner Brisbane
Richard - SharePoint Site Owner, .
Very good -Office365 Beginner Brisbane
Liem - Office365 Beginner, .
Great training - really good pace and so clear - enjoyed this training very much and learnt more than I knew before Thanks -Excel Customised Remote Online
Tricia - Excel Customised, .
Fantastic -Excel Customised Remote Online
Angie - Excel Customised, .
Learnt a lot thank you -Excel Customised Remote Online
Ann - Excel Customised, .
Amazing Trainer very patient and took the time to go through things thoroughly. Thank you Jason -Excel Customised Remote Online
Carly - Excel Customised, .
Very well structured course, easy to understand and follow. Highly recommended !! -Power BI Intermediate Sydney
Josep - Power BI Intermediate, .
Insightful Training. Trainer extremely helpful and took time to sort out any issues on the program. Trainer offered extra tuition if required. Trainer clear and concise in explanation. -Power BI Intermediate Sydney
Aishling - Power BI Intermediate, .
It is a good course. I learned a lot from this. Thank you -Power BI Intermediate Sydney
Eric - Power BI Intermediate, .
Very engaging, enjoyed and learned a lot. -Power BI Intermediate Sydney
Roman - Power BI Intermediate, .
Jagg teach method made the day very informative and interesting. Would have liked some notes to take away on tips and tricks. -Power BI Beginner Adelaide
Allison - Power BI Beginner, .
Very, very good. Extremely knowledgeable, very good communication, loved the hand gestures. -Power BI Beginner Adelaide
Rhett - Power BI Beginner, .
Extremely insightful and very helpful. For someone who has not had a lot of exposure to Power BI, I now feel quite confident with the basics of the program. -Power BI Beginner Adelaide
Ryan - Power BI Beginner, .
Jagg was excellent and have a good sense of humer!!. Learned a lot. Thanks Jagg. -Power BI Beginner Adelaide
Hikkaduwa - Power BI Beginner, .
Great introduction to Power BI, easy to follow along with, lots of good insight and well presented. Instruction was clear and good examples provided. -Power BI Beginner Adelaide
Linda - Power BI Beginner, .
great overview of the building of beginner power BI reports and dashboards. cant wait to build more reports -Power BI Beginner Adelaide
Louise - Power BI Beginner, .
That was very informative and well paced. Thank you -Power BI Beginner Adelaide
Hina - Power BI Beginner, .
Excellent course, Jagg was very informative and clear - thank you -Power BI Beginner Adelaide
Emma - Power BI Beginner, .
very knowledgeable -Office365 Beginner Brisbane
David - Office365 Beginner, .

Trusted by Business

south east asia microsoft training courses nexacu

Follow us