0

I am importing data from a website:
https://www.chancesgames.com/WinningNumbers/WinningList
It provides up to 30 days of data. I want only two days of data, that are specifically in columns a b e and d. here is the spreadsheet link:
https://docs.google.com/spreadsheets/d/1BRQO3lNuDXDYXujsDir5wo0xnQ49gzpomxw5zo2qctA/edit?usp=drivesdk

Could someone assist?

0

1 Answer 1

0

To only show columns A, B, D, E in the rows where the date is between the dates you enter in cells B1 and C1, use this formula:

=query( 
  importhtml("https://chancesgames.com/WinningNumbers/WinningList", "table", 1), 
  "select Col1, Col2, Col4, Col5 where Col1 is not null 
   and toDate(Col1) >= date '" & text(B1, "yyyy-mm-dd") & "' 
   and toDate(Col1) <= date '" & text(C1, "yyyy-mm-dd") & "' 
   and lower(Col2) matches '.*(" & lower(D1) & ").*' ", 
  1 
)

There is an additional keyword filter by the text string in cell D1 that lets you enter a state name or some such search word that appears in the House name. Leave cell D1 empty to show all rows between the two dates.

See the new Solution sheet in your sample spreadsheet.

2

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.