Split and Expand Multiline Words in an Excel Cell into Multiple Rows

chuxin huo
2 min readJan 11, 2021

In the following Excel file, column D and column E contain multiline words. The values in both columns have same number of lines and a one-to-one relationship between lines. For instance, F in D2 corresponds to Fail in E2.

Task: Split each value in both column D and column E by line break and expand it into multiple rows. Below is the expected result:

Directions to get this done:

1. Start esProc (Download esProc installation package and free DSK edition license HERE. You will be prompted to load the license file when you run esProc for the first time).

2. Write and execute script in esProc:

The script function news()is used to expand one row into multiple rows, where Grades.len() calculates the number of rows each row can be expanded to, the pound sign (#) represents the number of a new row, and Grades(#) gets values for each new row by their number.

--

--