I am importing data from a website:
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:

Could someone assist?


1 Answer 1


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:

  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) & ").*' ", 

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.


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.