Share via

Excel vLookup #N/A error

Anonymous
2022-07-20T19:13:00+00:00

I've ran many vLookup's in my career, but I can't seem to figure out why I can't get this one work and keep getting the #N/A error.

Here is the lookup value:

Here is the reference table and I'm trying to return - column 8 (H):

Thanks for the help!

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Rich~M 20,370 Reputation points Volunteer Moderator
2022-07-20T19:40:03+00:00

Hi Shepherd. I am an Excel user like you.

First, what is the formula you are using? I would help to see the exact formula.

In the meantime, you may have already checked for these, but this is what I look for first.

Check for extra spaces particularly at the beginning or end of either the lookup value or the target line in the lookup table. They will result in a mismatch.

Check the range of your lookup table. Make sure that you have the correct rows and columns referenced and that it is in Absolute Value form with the $ signs so that the formula can be drug down.

Make sure that the Row reference for the Lookup Value in the formula matches the row that the formula is in. If it is off by a row or two it can create strange results.

I notice that you have the filter turned on for the sheet with the reference table. If something is filtered it may throw off the table range as you enter it into the formula making it easy to choose the wrong row, for example as the first or last rows of the table. Make sure that there are no filters on and then double check the table range.

Reply if you have additional questions or more information. Please mark this reply as answered if this solves your question.

Rich~M

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Ashish Mathur 101.8K Reputation points Volunteer Moderator
2022-07-22T23:37:46+00:00

Hi,

You did not follow my advice. As requested in my previous message, i mentioned that you should copy the lookup value from one sheet to another to check what happens. When i copied A2 from the lookup table worksheet to cell A2 of the Open Time vLookup formula table worksheet, the VLOOKUP() returns the correct answer. So my surmise was correct.

Now that we know what the problem is, write this formula in cell B2 of the Open Time vLookup formula table worksheet

=VLOOKUP(A2,SUBSTITUTE(Table1,CHAR(160),CHAR(32)),2,FALSE)

Hope this helps.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2022-07-21T17:25:46+00:00

It would help us help you if you uploaded an example Excel file to a file-sharing website, and posted the download URL is a response here. I like box.net/files; others like dropbox.com. You might like onedrive.live.com because it uses the same login as this forum.

It appears that the expression is VLOOKUP(B5, A2:..., 8, FALSE), and you expect B5=A2 to be true. In fact, is it?

That is, for whatever cell in column A that you expect to match (A2, for example), what does =B5=A2 return?

In the image, the strings appear to be the same. In particular, there does not appear to be any extraneous spaces.

But looks can be deceiving. And not all spaces are the same. There are normal spaces (ASCII 32) and non-breaking spaces (ASCII 160). Also, a tab (ASCII 9) can look like a single space. Finally, there could be not non-displayable control characters.

One way to see these differences is to enter the following into C5 (for example) and drag across (into D5, E5, etc) for at least LEN(B5) columns.

=IF(COLUMNS($C5:C5)>LEN($B5), "", CODE(MID($B5,COLUMNS($C5:C5),1)))

Do the same for A2 starting in C6, to wit:

=IF(COLUMNS($C6:C6)>LEN($A2), "", CODE(MID($A2,COLUMNS($C6:C6),1)))


PS.... Also check for other culprits that cause "inexplicable" errors, for example:

  1. Is Automatic Calculation enabled?
  2. Do you have any circular references, even in unrelated cells (and worksheets?)? Click Format > Error Checking > Circular References. The notification on the lower lefthand status bar might not always be correct.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

10 additional answers

Sort by: Most helpful
  1. Rich~M 20,370 Reputation points Volunteer Moderator
    2022-07-21T16:32:21+00:00

    I'm somewhat baffled too. It may help to actually see the formula as it appears in the formula bar. If you could include a screenshot of that so we can actually see the entire formula, we might see something there.

    It appears that you are using two different documents so adding a link to a document probably won't be of help. Here are a couple more random questions:

    Are these documents on your computer or on some cloud location or server that could cause an issue?

    Are you using Excel in a desktop version or online?

    Reply if you have additional questions or more information. Please mark this reply as answered if this solves your question.

    Rich~M

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-07-21T12:22:40+00:00

    Mark,

    Thanks for the response. I always use the formula builder and below is a screen shot.

    I feel like I've triple checked the extra spaces in both tables and didn't find any. I've also counted the range several times to ensure the correct rows and columns work. I haven't used the Absolute value sign $, but I can't even get the formula to work in one cell without the #N/A error. I can also turn off the column filter. I feel like it's something else I can't put my finger on. Thanks for looking at this problem and please let me know if you have any other ideas or feel I've missed something.

    Was this answer helpful?

    0 comments No comments