I would like to ask for your advices. I have a problem with this

I tried to use REPT in excel but the result show all multiplied word in on cell. How Can I improve it?
I want to result be like

and sort from Z to A by code. How can I do it. Thank you so much
 
     
    
 
    
