Search code examples
excelgoogle-sheetslibreoffice-calc

Google Sheet or Excel Text to rows


I've trouble converting text in the spreadsheet into rows. All Google examples are using the options text to columns and then transpose. The initial table structure.

company email
Company 1 john@company1.com, mary@company1.com,info@company1.com
Company 2 john@company2.com, mary@company2.com,info@company2.com

I want it to convert into and after filling the company field down.

company email
Company 1 john@company1.com
mary@company1.com
info@company1.com
Company 2 john@company2.com
mary@company2.com
info@company2.com

Solution

  • In LibreOffice Calc, for such tasks I use this trick:

    I write down for the first cell the formula of the form =A1&CHAR(9)&SUBSTITUTE(B1;",";CHAR(10)&A1&CHAR(9))
    and copy the formula to the end of the list.

    Then select a column and use Data - Text to Columns with separator Tab.

    Demo