1

If I try =GOOGLEFINANCE(A1,"volume",A2) where A1 is the stock code and A2 is the date I'm querying, it comes back printing 'date' and 'volume' on one line as headers and then the data on the line below. Is there a way to have this formula printing on each line without the headers?

e.g. GOOG

A1  13/06/20  B1 daily volume  
A2  12/06/20  B2 daily volume
A3  11/06/20  B3 daily volume

I'm just trying to build the formula that can give the data for B1,B2,B3 etc and drag it down so the data is on each line querying the respective date in column A.

What formula do I need to use?

0

It's rather easy to get a list of data: just add the number of days as a parameter, e.g.

=GOOGLEFINANCE(A1,"volume",A2,30)

Specifying start and end date is also possible, see the documentation.

enter image description here

If you want it for specific (non-consecutive) dates, I'd suggest to use VLOOKUP or some other query method. An example:

The Finance formula is now =GOOGLEFINANCE(A1,"volume",MIN(A2:A100),MAX(A2:A100)) and the second column is =VLOOKUP(A2+TIME(16,0,0),D:E,2,FALSE); adding 16 hours is one possible way to make sure it matches the timestamp in the 'Date' column.

enter image description here

| improve this answer | |
  • Thanks, but how do I get it to actually query the specific dates in column A? I've tried VLookup but cant get the formula right. =GOOGLEFINANCE(A1,"volume",A2,30)prints out the results as you have it above but how do I amend it so it queries the specific date? What I want to be able to do is put the formula in B2 and drag it down to query the volume of a specific stock against a specific date. I have 10/06/2020, 09/06/2020, 08/06/2020, 05/06/2020, 04/06/2020 in column A and I want to have the specific volume in column B and drag down the formula. Thanks a lot! I appreciate it. – Charlie Jun 18 at 15:16
  • @Charlie see the updated answer. VLOOKUP is a bit tricky here because of the timestamp returned by Google Finance, but it's doable. – Glorfindel Jun 18 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.