Forum Discussion

anupambit1797's avatar
anupambit1797
Iron Contributor
Nov 27, 2024
Solved

Text Paring with a "\n" New line char

Dear Experts, 

                    In the attached sheet, I have data in Column "A" as below:-

So, each cell has items separated by a "\n", I want to parse it in a way that all the items with a new line should be separate in separate columns,

Thanks in Advance,

Br,

Anupam

  • Table it and load into PowerQuery.

    Choose to split column on delimiter like this:

    #(lf) is for line feed. If you click Insert special character PQ will put in the #(lf) for you.

3 Replies

  • Rodrigo_'s avatar
    Rodrigo_
    Iron Contributor

    Here's my approach:

    1. Replace New Lines with Another Character:
      • Press Ctrl + H to open Find and Replace.
      • In "Find what," press Ctrl + J (represents a newline).
      • In "Replace with," enter a delimiter like a slash ( / ).
      • Click Replace All.
    2. Use Text to Columns with your chosen delimiter to split the text.
    • SergeiBaklan's avatar
      SergeiBaklan
      Diamond Contributor

      Ctrl+J works directly in Text to Columns (at least on Windows) if enter in Other on second step.

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    Table it and load into PowerQuery.

    Choose to split column on delimiter like this:

    #(lf) is for line feed. If you click Insert special character PQ will put in the #(lf) for you.

Resources