Data in Excel from Rows to Colums Below

I have data in sheet in this format:-
fruits mango $10 vegetables tomato $10 car civic $310
bananna $60 potato $60 verna $960
grapes $70 beans $90 figo $970

I want to place the data one beolw the other in this format.

for detecting the different groups have a look here:

also it looks that you have to create the input datatable on which you are doing the groupby by splitting the different Excel rows. But this should be done easy by just reefering to the position indexes