VBA Vlookup Left part of range

Ryu 1 Reputation point
2021-02-18T02:50:20.567+00:00

I have the left 9 characters that I want to Vlookup in a range in VBA, but in the range lookup, I want to only search for any instances where it finds the exact same 9 characters in sequence then return the location of that cell. Can someone help me?

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erin Ding-MSFT 4,461 Reputation points
    2021-02-18T09:33:58.717+00:00

    @Ryu

    Based on your description, do you mean that you would like to use VBA to realize your requirement?
    I will add a tag "office-vba-dev" for you to get related help since tag "office-excel-itpro" focuses on general issues about Excel clients.

    Could you please give a sample so that we could understand your issue better or do a test for you?

    Any misunderstandings or updates, please feel free to post back.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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. Ryu 1 Reputation point
    2021-02-18T21:12:29.467+00:00

    Thank you for your reply.

    In Sheet1, I have a list of employee position and at the end of those they say, "trainee". In Sheet2, I want to do a vlookup in VBA (since I have a command button associated to this module) to look at the 1st 9 letter in A60 if B60 has a value in it, then make those 9 letters = EE_Pos. Then with Vlookup (EE-Pos, [in this range only match the 1st 9 letters and return the row where the case is true]

    I hope I am more clear on what I'm trying to do.


Your answer

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