1

I want to return text from cells in column A when column B contains current or future date.

Column B has set the data validation to date.

I'm able to make it work for today's date with this code, but I cannot do it for today's and future date. =QUERY(A9:B,"SELECT A WHERE B = date'"&TEXT(TODAY(),"yyyy-mm-dd")&"' ",0)

How could I do it?

M-K
  • 77
  • 5

1 Answers1

1

Insert:

 or B > date'"&TEXT(TODAY(),"yyyy-mm-dd")&"'  

should work.

pnuts
  • 58,317
  • 11
  • 87
  • 139
  • Yes, it worked. Thank you. Can I add a default text that will be shown when none of the cells has the current or future date? At the moment it shows 'N/A' and an error label :( – M-K May 21 '17 at 16:35
  • 1
    Thanks for suggesting IFERROR. This is what I was looking for. – M-K May 21 '17 at 17:15