DEV Community

Cover image for #62 - Search for A Specified String across The Whole Table
Judith-Data-Processing-Hacks
Judith-Data-Processing-Hacks

Posted on

2 2 1 1 1

#62 - Search for A Specified String across The Whole Table

Problem description & analysis:

We have two Excel sheets, and there are same-structure tables in the two sheets.
Sheet1

sheet1
Sheet2

sheet2
Task: Search every cell of each table and match their values with a specified string, such as foo. If the matching succeeds, list the whole current row.

desired table

Solution:

Enter the following formula in SPL XLL:
=spl("=(?1|?2).select(~.contain(?3))",Sheet1!A2:C7,Sheet2!A2:C7,"foo")

As shown in the picture below:

result table with code entered

Explanation:

The symbol | is used to concatenate two sequences.


The example was originally on StackOverflow. Feel free to compare the conventional solutions with the SPL approach to grasp the efficiency of esProc SPL. Download esProc Desktop and say hello to a streamlined table! 👋💻✨

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (1)

Collapse
 
judith677 profile image
Judith-Data-Processing-Hacks

Ask away if you have any Excel-related problems, and we'll be more than happy to help:

🙌🏻Discord
🙌🏻Reddit

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay