N/A error in vlookup

Anonymous
2025-05-26T19:31:32+00:00

I am returning an N/A error in a VLookup formula that is referencing the value returned by a =right formula and I cant fix it.

Firstly I have a formula to extract the last 4 digits of a field, that is a post code ie 3300... that seem to work fine

I then have a vlookup formula to lookup the value returned by that = right formula ie 3300 and then return the name of the corresponding Suburb from a seperate TAB

I get an N/A error.

If I manually override the value returned by the = right formula, then the vlookup works...????

Any idea how to fix this???????

Example below

Address Column C Postcode Column D Suburb
1 McKay St , Learmonth VIC 3352 =RIGHT(C2,4) =VLOOKUP(D2, Postcode!A:B, 2, FALSE)
Address Postcode Suburb
1 McKay St , Learmonth VIC 3352 3352 #N/A
Microsoft 365 and Office | Excel | Other | Other

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
2025-05-26T19:47:27+00:00

The RIGHT function returns a text value even if it looks like numbers. Make this modification to your RIGHT function which will convert the numbers stored as text to number values. Excel will then be able to match that number value to the number value in your Lookup Table.

=--RIGHT(C2,4)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2025-05-26T21:07:11+00:00

    Thanks

    Thats another good option

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2025-05-26T20:20:23+00:00

    Hi Iain

    The above solution is 100% correct,

    But also, for the Postcode column, you may try the formula =VALUE(RIGHT(C2,4))

    I hope this helps you

    Regards

    Jeovany

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-05-26T20:18:09+00:00

    The RIGHT function returns a text value even if it looks like numbers. Make this modification to your RIGHT function which will convert the numbers stored as text to number values. Excel will then be able to match that number value to the number value in your Lookup Table.

    =--RIGHT(C2,4)

    Thanks Rich M... That worked a treat..!!!

    Was this answer helpful?

    0 comments No comments