

Clicking the Convert to Number option will fix the selected range. See Figure 5.Ĭlicking the small drop down displays a menu that offers the solution. Pointing to it will display the error involved. If a column of numbers is formatted as text, you can select the range involved and another small icon with an exclamation mark will display. Excel’s built-in error checking displays a tiny green triangle in the top left of a cell to warn you that a number is formatted as text. If you want to fix the data in the table and convert the text numbers into real numbers, Excel has a built-in technique to fix the problem. The "" means a blank and adding it to the start of the A2 does not change the value. The & symbol joins text together and using it automatically converts numbers to text. Placing ""& in front of A2 instructs Excel to treat A2 as text. The following formula amends the formula in B2 and converts the number to a text number: The second option is to amend the VLOOKUP function to convert the real number into a text number. The apostrophe doesn’t display, but you see it if you edit the cell as per the centre image in Figure 2. The first is to insert an apostrophe in front of the number you are looking up. To look up a text number, you have two choices. You have two options: convert the real number you are looking up to text and then look it up, or convert the text numbers in the left column of the table to real numbers.įigure 1 will be used to demonstrate the remaining techniques. Unfortunately, if you look up a real number and the table has text numbers, Excel will not find a match. You can spot this because the numbers will be left aligned, rather than right aligned. Sometimes when you import data into Excel, the numbers are formatted as text. This problem only applies to numeric codes. Note: always select a range before using Find and Replace, otherwise you may be affecting the whole sheet. This replaces all the spaces with nothing. Select the left column of the table and press Ctrl + h type a single space into the Find box and then click the Replace All button. If you have no spaces within your codes, you could also use the Find and Replace option (Ctrl + h) on the left column to remove all spaces. You then copy the trimmed range and use Paste Special Values to paste the trimmed values on top of the original values. Typically, you use a blank column to the right of the table to enter a range of TRIM functions referencing the left column of the table. The formula to trim an entry in cell A1 is: The TRIM function removes all leading and trailing spaces. While this is a frustrating problem, it is easily solved with the TRIM function. You need to use the right align format on the column to identify any trailing spaces. Padding with trailing spaces is harder to notice, as text entries are left aligned.
#Vlookup not working in excel for mac code
Padding with leading spaces is obvious, as the code is not left aligned. If a field has a maximum of 10 characters but only six characters are used for the code, then four spaces are added to the beginning or end of the code to fill up the field. Padding means filling the field with spaces. Systems still pad entries with spaces when data is exported into Excel. The most common problem is leading and trailing spaces in the left column of the table.

When using an exact match, the code or value must be in the left column of the table, otherwise the #N/A error is displayed. You specify an exact match by including FALSE or a zero at the end of the VLOOKUP function.

The exact match type of VLOOKUP is the one usually affected. Most issues relate to the data table, especially when it is imported from other systems. The other columns in the table can be accessed by “looking up” the code or value in the left column. This function works well with a standard table layout that has a code, or value, in the left column of the table. While it is easy to use, it is also easy to break. VLOOKUP is the function I receive most queries about. Help! My VLOOKUP doesn’t work – what should I do?
