#70 — Search by Adjacent Rows

Judith-Excel-Sharing - Oct 10 - - Dev Community

Problem description & analysis:

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

source table
Task: 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.

Solution:

Use SPL XLL and enter the following code:

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

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.

The results are as follows:

result table


Feel free to download esProc Desktop and Boost your data processing skills with SPL XLL! 🚀🔥⬇️

✨SPL download address: esProc Desktop FREE Download

✨Plugin Installation Method: SPL XLL Installation and Configuration

✨References to other rich Excel operation cases: Desktop and Excel Data Processing Cases

✨YouTube FREE courses: SPL Programming

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .