I'm interested in pulling a specific # from Yahoo Finance.

I'm looking at American Airlines AAL

I have found the table:


But I am having trouble trying to query the Price/Sales (ttm): information.

This is what I have and when I tried to query it:

=query(importhtml("https://finance.yahoo.com/q/ks?s=aal&ql=1","table",11), "where Col1 = 'Price/Sales (ttm):'")

enter image description here

How do I not include the Market Cap?


If you don't want the header row with "Market Cap", tell the query command that the table has no header. The optional third parameter of query is the number of header rows. (When it's not provided, the spreadsheet will make a guess based on the appearance of the data, which is not always a correct guess).

=query(importhtml(...), "where Col1 = 'Price/Sales (ttm):'", 0)

| improve this answer | |

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.