Posts by ABarr

    Re: VLookup multiple columns and return to a single cell seperated by commas


    I was wondering how I would go about changing the function so that it returns 1 value per cell and can be dragged down so each returned value has its own cell rather than putting all values in one cell separated by commas. In addition, I was wondering how I could name the range of cells that gets returned after the value being matched. (as a heads up, I'm using your original code, for single matches, not the second code you posted.)


    So I have a table like this:



    Dept Code
    C2H GL_PROD_XYZ
    C2H
    C2H GL_DIV_123


    The function works perfectly and returns GL_PROD_XYZ and GL_DIV_123 separated by commas but I'd like to have a range that includes GL_PROD_XYZ and GL_DIV_123 and is named "C2H" so that I can later refer to that range for another lookup down the road.


    I appreciate any help you might be able to give me.