Ask Your Question

populate from another worksheet if two fields match

asked 2017-04-27 17:49:18 +0200

I have two worksheets, and want to populate a field if two fields in one sheet match two fields in the second.

Worksheet #1
WIX   51515    4.37    6.49    '01-57 CHR/FORD/MAZDA'
WIX   51516    4.37    6.49    '15-81 FORD/CHR/MAZ'

Worksheet #2
W51515      WIX    51515
W51516      WIX    51516

I need to populate a field in Worksheet#1 with the first column in Worksheet#2; if WS1.a?=WS2.b? AND WS1.b?=WS2.c?. Below is the result I would like, with the first column on Worksheet #2 inserted into Worksheet #1.

Worksheet #1 (finished product)
WIX   51515    4.37    6.49    '01-57 CHR/FORD/MAZDA'      W51515
WIX   51516    4.37    6.49    '15-81 FORD/CHR/MAZ'        W51516
edit retag flag offensive close merge delete


Your wording sounds database. Using spreadsheets there are no tables, no fields, no joins - and no queries. . There are sheets, columns, rows, cells, cell ranges - and formulas returning their results to cells they are contained in. Nothing gets "populated".
To get something similar to a join (what kind of?) by formulas may be complicated, error-prone, and inefficient.
Only if your "?" question marks are meaning "the same row" things are simple. Otherwise there is need of better information.

Lupp gravatar imageLupp ( 2017-04-27 18:33:39 +0200 )edit

@Lupp Not fully true. The difference between a db and a spreadsheet is merely the naming: the spreadsheet file is the db, the sheets/tabs the tables and the columns and rows in the sheets are same in a typical row-based relational db.

rautamiekka gravatar imagerautamiekka ( 2017-05-03 15:32:41 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-04-27 18:29:32 +0200

librebel gravatar image

Hello returnerjr, for the new column you could define a formula like this:

=IF(AND(A1 = Sheet2.B1; B1 = Sheet2.C1);Sheet2.A1;)
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-04-27 17:49:18 +0200

Seen: 25 times

Last updated: Apr 27 '17