to keep them together when sorting you need to fill in those blanks in fields you want to sort by or just have another column/s with them filled in to sort by
example to get a filled list of documents in another column say col X
then use in x2 and dragged down
=IF(A2="",X1,A2) repeat for each column say "writer" in col. Y =IF(B2="",Y1,B2)