Google-sheets – Vlookup with values from another tab

formulasgoogle sheetsgoogle-sheets-arrayformula

Link to my sheet: https://docs.google.com/spreadsheets/d/1E3gH661qnZDUvP48Ubg6epuHwpDH70gANE8wW968dYg/edit?usp=sharing

I'm having trouble understanding what I'm doing wrong.
I'd like to have this spreadsheet autofill data based on the selection from the drop down menu under name. In the examples tab I'd like to be able to select a name from the drop down menu and have it automatically fill in their phone numbers and emails based on the information plugged into the "Contacts" sheet.

From what I understand this can be achieved with an array formula, but I seem to be misunderstanding the application. This is the formula I've gotten to so far, was wondering if someone could outline what I'm doing wrong.

=arrayformula(IF($E4:E8=Contacts!D4:D8, hlookup(Contacts!G4:G16,F4:F16, 1, False)))

Best Answer

Please use the following formula for your needs:

=IFERROR(ArrayFormula(VLOOKUP(E4:E16,Contacts!$D$4:$H$16, {4,5}, False)))

Functions used: