Search code examples
google-sheets

How to combine these two tables


please do anyone have idea on how to do this with googlesheets

Table 1

Countries Currency
Nigeria Ngn
Canada Cad
USA Usd

Table 2

Countries Continent
Nigeria Africa
India Asia
Germany Europe

I want to accomplish this

Countries Continent Currency
Nigeria Africa Ngn
India Asia
Germany Europe
Canada Cad
USA Usd

Any idea is welcome... Thanks


Solution

  • You can use:

    =ARRAYFORMULA(LET(c,UNIQUE(TOCOL({D2:D;A2:A},1)),IFNA({c,VLOOKUP(c,D2:E,2,0),VLOOKUP(c,A2:B,2,0)})))
    

    img