It depends how your sheet is set up, but you may be able to use
conditional formatting. For example, if the cell below each subtotal is
always blank, and no other cells in the column are blank, set
conditional formatting to -- Formula Is: =A5=""
where cell A4 is being formatted.
There are instructions in Excel's Help files, and on the following page: