I think you have pairs of items here correct? The name of the item and its quantity?
You can use sliding options to set your quantity fields to slide up and you can also specify the "resize enclosing part" option to remove the unused space, but that wont' work for the names. To get them to work, define calculation fields such as:
If ( Not IsEmpty ( Co23quantity ) ; "Co23" )
These fields will be empty when the quantity fields will be empty and now they can slide up.
This assumes that they are not listed in a portal in your trailing grand summary. If this is a list of records in a portal, define a portal filter (FileMaker 11 or newer) or a filtered relationship (Older versions) that will exclude records where the quantity is empty. The portal can then be set to slide and reize to eliminate the unused portal rows.