Build me a macro to arrange numbers in rows/columns

Job ID: 33730247

Budget: ₹1,500 – ₹12,500 INR

I have a set of numbers - Eg - K9, H3, Y5, and so on. In one row of excel, I need K in each cell one after the other K9 in every 9 times repeated, then H3 3 times, the Y5 5 times. This loop will go on till the time the name ends.