From https://superuser.com/questions/507726/excel-prevent-cell-text-from-overflowing-into-next-empty-cell
Option 1: Fill all empty cells with a "N/A" and then use Conditional Formatting to make the text invisible. Or Option 2: Fill all empty cells with 0 and use an Excel setting to hide zero values.
=A1="N/A"