LubieCiastka
LubieCiastka

Reputation: 143

Google SpreadSheet Query: How to find specific data

https://gyazo.com/07bafa5de65bfbfc8d523d1e5eaa0fbf

data I have some data A1:G5 and i want to find latest fee from specific transactions (in WHERE -> FROM, Currency )

I have timestamp:

=QUERY(A1:G5, "SELECT MAX(A)  WHERE F = 'Aaaa' AND C = 'PLN' ")

1) I dont want label.
2) How to get fee?

Answer:

Last Fee: 0.1

Timestamp: 13/02/2018 13:01:21

Upvotes: 1

Views: 75

Answers (2)

Ed Nelson
Ed Nelson

Reputation: 10259

Change your query to this to remove the label:

=QUERY(A1:G5,"SELECT MAX(A) WHERE F = 'Aaaa' AND C = 'PLN' LABEL MAX(A) ''")

To get the Fee, assuming the above query is in B11, enter this in A11:

  =VLOOKUP(B11,A1:G5,5,FALSE)

Upvotes: 2

pnuts
pnuts

Reputation: 59450

Please try (it avoids MAX):

=query(A1:G5,"select E, A where F = 'Aaaa' and C = 'PLN' order by A desc limit 1",0)

Upvotes: 2

Related Questions