You can do this with a simple formula. Given the range shown in your example, insert a new column to the right of column A. In this new column B, write:
B137: =if( isblank(A137) ; B136 ; A137 )
Duplicate the formula in B137 into the cells below it.
Let's unpack this:
- B136 looks to the left for its value (A136).
- B137 looks to the left for its value (A137), but if blank, uses the previous value (B136).
- B138 looks to the left for its value (A138), but if blank, uses the previous value (B137).
- … and so on.
Depending on your needs, you might be done at this point. Optionally, you can hide column A. Or you can copy column B, "paste values only" into column A, and delete column B.
You asked to do the identical operation with the data in column D, so the solution will be the same.
E137: =if( isblank(D137) ; E136 ; D137 )
Please post your followup question about rows with blanks at the end as a separate question, and provide more detail. It's not clear what the problem is.