SOLVED

Replace "," with a "Newline" in Excel

Iron Contributor

Dear Experts,

                     I have a query like below ;-

In Column "A", I have data like below, and need Output like in Column "D" ;

anupambit1797_0-1727836467998.png

 

Thanks in Advance,

Br,

Anupam

 

6 Replies
best response confirmed by anupambit1797 (Iron Contributor)
Solution

Hi @anupambit1797 

 

With Power Query Split Column (on the Home tab)

Sample.png

@anupambit1797 

Staying within the Excel formula environment, you could have

= TOCOL(
    HSTACK(
      TEXTBEFORE(pairs,","), 
      TEXTAFTER(pairs,",")
    )
  )

The more obvious use of TEXTSPLIT that would have mirrored the PowerQuery operation more closely fails because of Microsoft's well-known 'array of arrays' implementation error.

 

Thanks , @PeterBartholomew1 could you please help to provide the result sheet with the formula,

 

I tried the one you suggested but, seem to throw me a #NUM err.

anupambit1797_0-1727889201825.png

 

Thanks in Advance,

Br,

Anupam

 

@anupambit1797 

 

Replace YourTableName belows with your actual Table name:

= TOCOL(
    HSTACK(
      TEXTBEFORE(YourTableName[RLC-NR_Sequence Numbers(Subcell-9)],","),
      TEXTAFTER(YourTableName[RLC-NR_Sequence Numbers(Subcell-9)],",")
    )
  )

 

 

Thanks a lot@Lorenzo ,

anupambit1797_0-1727890294098.png

Br,

Anupam

 

@anupambit1797 

Seems I did not hit Save on the file.  Still, it was quick enough to reintroduce the defined name 'pairs' and copy/paste the formula. 

 

Stacking variable length comma-separated strings is something that is possible, but far harder to achieve.

 

1 best response

Accepted Solutions
best response confirmed by anupambit1797 (Iron Contributor)
Solution

Hi @anupambit1797 

 

With Power Query Split Column (on the Home tab)

Sample.png

View solution in original post