0
votes

I am using Google-sheets.

I have a Data-table like:

x|A           | B          | C
1|date        |randomNumber|
2| 20.02.2018 | 1243       |
3| 18.01.2018 | 2          |
4| 17.01.2018 | 1          |

and a overview table:

x|A           | B          | C
1|date        |randomNumber|
2| 20.02.2018 |            |
3| 17.01.2018 |            |

I want to lookup the dates on the overview table and lookup their value in my data table. Not every date of the data sheet has to appear in the overview table. All colums are date-formatted.

My approach so far was:

=QUERY(Data ;"select B where A = date '"&TEXT(A2;"yyyy-mm-dd")&"'")

but i get an empty output, which should not be the case, I should get 1243.

Thanks already :)

2
updated, went wrong in debugging, still the same problemKuSpa

2 Answers

3
votes
=ARRAYFORMULA(VLOOKUP(A2:A3;DATA!A1:B4;2;0))
2
votes

With QUERY (copied down from B2 to suit):

=QUERY(Data!A:C;"select B where A = date '"&TEXT(A2;"yyyy-mm-dd")&"'";0)