2

I was wondering if you could help me with a google sheets formula for the following issue:

enter image description here

I am trying to use a dynamic date formula so that I could extract all the letters from column B that appear in the last 40 days to a different tab in the same sheet. This should be always up-to-date because I would like to see if there are any changes every day.

I started with something like this:

=QUERY(Sheet1!A2:B, "select B WHERE A ”>=”&(TODAY()-39)")

But I keep getting an error. Any idea how to fix it? I'm a beginner in this and I need it for a project, so I'd appreciate any help I can get.

player0
  • 124,011
  • 12
  • 67
  • 124
MM91
  • 23
  • 4

1 Answers1

2

try:

=QUERY(Sheet1!A2:B; "select B where A >= date '"&TEXT(TODAY()-39; "yyyy-mm-dd")&"'"; 0)

or:

=FILTER(B2:B; A2:A>=TODAY()-39)
player0
  • 124,011
  • 12
  • 67
  • 124