DEV Community

Cover image for #123 — Convert One-Dimensional Array to Two-Dimensional Array
Judith-Excel-Sharing
Judith-Excel-Sharing

Posted on

#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

Top comments (1)

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