Consulting

Results 1 to 4 of 4

Thread: VBA Code - Lookup column1 in Column2

  1. #1

    VBA Code - Lookup column1 in Column2

    Hi,
    I working on the same case in a different way. Could you please help me with the sample VBA code for below scenario:


    I have Only one sheet name (HYP).
    In that I have 4 columns column1, column2, column3, Column4.

    Lookup each value of column1 in Column2.

    If Column1 Cell 1 is matching with Column2 Cell 4 then adjacent value in Column3 Cell 4 (corresponds to column2 cell 4) should return on column4 Cell1.



    I hope you understand the scenario.


    Thanks for your help.

    Regards,
    Sri

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,068
    Location
    Have you tried the macro recorder to get the fundament basics for the required code?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Hi,

    I am trying below code, but its not displaying any result.

    Regards,
    Sri

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    multiposted and formula solution offered here: http://www.vbaexpress.com/forum/show...lay-the-result
    For a vba solution record yourself putting the formula in the entire range, then continue recording while you copy/paste-special values.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •