6.8 Search by adjacent rows

 

We have a statistical table for daily sales of January 2022:

imagepng

Now we want to find out the data of date where the previous and next day’s sales are both more than 500 lower than that of the date:

=spl("=E(?1).select(Sales[-1]<Sales-500 && Sales[1]<Sales-500)",A1:B32)

Sales[-1] represents the value of the column Sales of the previous row, and Sales[1] represents the value of the column Sales of the next row.

imagepng


https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1654220724459
https://c.scudata.com/article/1654307849156