Hello, if anybody can help me please.

I have sheet in excel I received which looks like cells marked with 1, I'm looking for a way to make it look like to, so basically the task gets repeated down until task 2 starts then it does the same for task 2, the table marked as 3 would be great if that's even possible.

excel query.PNG

Thank you in advance