Forum Discussion

Spotto's avatar
Spotto
Icon for Helper IV rankHelper IV
3 years ago
Solved

Separate two or more codes on the same line into two or more lines

Hi everyone, I need some help.
I have a table in excel that has a column (VOUCHER) where there are two codes separated by (-), I would like to know how to do it in power query to separate the VOUCHER into two or more lines and repeat the other information from the other columns

 

Example 1)

CODETIPEVOUCHER
287865 X11955734 - 1955745

 

RESULT

CODETIPEVOUCHER
287865 X11955734
287865 X11955745

 

Example 2)

CODETIPEVOUCHER
123456 X11955734 - 1955745 - 1957865

 

RESULT

CODETIPEVOUCHER
123456 X11955734
123456 X11955745
123456 X11957865

 

tks for helpe me 🙂

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Spotto 

     

    You can split your column in rows with the advanced options of split column:

    and you get what you want exactly

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Spotto 

     

    You can split your column in rows with the advanced options of split column:

    and you get what you want exactly