Search code examples
google-sheetsgoogle-sheets-formulaspreadsheet

Filter rows from the last 15 minutes


I need to filter from B to K IF column A is any time in the last 15 minutes from now AND column J says "Yes"

A has the format Hour-Minute-Second, for example "17:20:59". Lets say now is 18:00:00, I want this formula to return all values from 17:45:00 until now.

For now I did this:

=FILTER(B:K, A:A=TODAY(),J:J="Yes")

I need the same but instead of today, the last 15 minutes.

How can I achieve this?


Solution

  • Now returns the time whereas today does not, just subtract minutes / 1440 because that is how many minutes are in a day:

    =FILTER(B:K, A:A>=Now()-15/1440+n(whatthefoxsay()),J:J="Yes")