简体   繁体   中英

Relate Table1 to table2 and show a field from table2 on table1

I need to be able to relate table1 to table2 based on an ID value each table shares. If ID from table1 = ID from table2 I want to show a date value from table2 on table1.

If someone can help me that would be great.

Vlookup should work for you:

Use VLOOKUP, one of the lookup and reference functions, when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number.

In its simplest form, the VLOOKUP function says:

=VLOOKUP(Value you want to look up, range where you want to lookup the value, the column number in the range containing the return value, Exact Match or Approximate Match – indicated as 0/FALSE or 1/TRUE).

=VLOOKUP('IDINTABLE1,RANGEINTABLE2,COLUMNWHEREISTHEVALUEINTABLE2,0)

This should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM