Vlookup formula error

Andrea Downing 0 Reputation points
2025-12-15T15:22:00.0066667+00:00

I have a vlookup in my column F to look for the PO number in Column D and spit out a GL code from a secondary tab. However, I think because the formatting in column A is text, and I can't convert it to number because I need the leading zeros, it is giving me an #N/A. Does anyone know of any workarounds that can get my formula to work correctly??? I highlighted the formula.

User's image

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Hendrix-C 8,655 Reputation points Microsoft External Staff Moderator
    2025-12-15T15:53:55.3366667+00:00

    Hi @Andrea Downing,

    Thank you for posting your question in the Microsoft Q&A forum.

    According to your concern, you can convert the number formatting inside the VLOOKUP formula. If the lookup value in the Sheet1 is numeric like 94552, you can use this formula:

    =VLOOKUP(VALUE(A2), Sheet1!B:F, 5, False)
    

    Please notify me if I've misunderstood anything about your situation. You can try the formula and let me know if it works for your situation. If not, we can work together to find the solution.

    If you need further assistance, please feel free to share it under the comments of this post. I'm happy to help.

    Looking forward to your response.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".      

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 


  2. Barry Schwarz 4,871 Reputation points
    2025-12-15T17:51:19.3266667+00:00

    VLOOKUP looks for the specified value in the leftmost column of the array you provide. Since the value you want is in column D, change the array from B:F to D:F and the return column from 5 to 3.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.