Search code examples
google-sheetsgoogle-sheets-formulavlookuparray-formulas

Vlookup from One Column to Place Values in Multiple Columns


I'm trying to use vlookup to return multiple phone extensions for the same room number. Normally, I would be able to accomplish this using vlookup, but it only returns one value from one column. Is there a way I can get vlookup to return multiple values within same column across multiple cells?

In the sample spreadsheet I've provided that you can edit, I have the same room number multiple times in column A within tab titled "Phones" because sometimes there is more than 1 phone in the same room. I'm wanting to use an arrayformula that uses vlookup in tab titled "Users" to bring over each phone for the same room, in columns B and C, titled Phone 1 and Phone 2.

Thanks for your help!


Solution

  • You can try FILTER() function.

    =TRANSPOSE(FILTER(Phones!B:B,Phones!A:A=A2))
    

    enter image description here