code search between two column and result in three column

  • hi, guys

    i'm beginner in vba and i try writing code to search between two columns and show the results in column(d) but the code doesn't work at all i have 4 columns a,b,c,d the column a is the number of code and column b is the name when i write in column c the number of code shows in column d the name and when i write in column c the name it gives me in column d the number of code the data begins from a2:d

  • Hi,


    A couple of questions for you ...


    1. Why are you posting in the section ' Excel General ' when you are asking for a macro ...

    You should use the section Excel VBA / Macros ...


    2. Posting a macro without attaching the file ... is only uselessly complicating the matter ...

    Please attach your file

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • actually number 1 you right and i'm sorry about 2 this is my file

  • actually number 1 you right and i'm sorry about 2 this is my file


    From your comments ... I am right about the TWO points :D


    Attached is your test file


    Hope this will help

    Files

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)