Hello

I have an excel spread sheet with data and a number. I need a formula to repeat the data to the amount of the number and also one column counts. As an example

WS Carrier Route Number
C001 4
C002 3
C003 2

Result

WS Carrier Route Number
1 C001 4
2 C001 4
3 C001 4
4 C001 4
1 C002 3
2 C002 3
3 C002 3
1 C003 2
2 C003 2

I am not sure if this is possible. I am not an advanced user of Excel.
Thanks for any help.