DEV Community

Cover image for #123 — Convert One-Dimensional Array to Two-Dimensional Array
Judith-Data-Processing-Hacks
Judith-Data-Processing-Hacks

Posted on

2 1 1 1 1

#123 — Convert One-Dimensional Array to Two-Dimensional Array

Problem description & analysis:

Here below is a data table:

source table

Task: We want to convert the data to a 5-column & N-row table with a header, in the order of horizontal arrangement first and then vertical arrangement.

Solution:

To achieve this, use SPL XLL and enter the formula in cell B2:

=spl("=?1.conj().group((#-1)\5)",A1:A26)
Enter fullscreen mode Exit fullscreen mode

The results are as follows:

result table

Subtract 1 from serial number # to get the difference, and divide the difference by 5 to get the quotient. Grouping by this quotient can put every 5 numbers in a group.


Download esProc Desktop for FREE and work smarter with your data using 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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more