I am trying to split the range of data like this :-
At first I was using this :-
=ARRAYFORMULA(IF(ROW($B$2:$B)>=(SUM($A$2:$A) ROW()),"",IFERROR(SPLIT(LOOKUP(ROW($B$2:$B)-ROW(),IF(ROW($B$2:$B)>=(SUM($A$2:$A) ROW()),"",SUMIF(ROW($A$2:$A),"<"&ROW($A$2:$A),$A$2:$A)),A2:A),"