Auto-fill empty cells with specific text

T

Toby

Using Excel 2010.

I have text "A" in row 2, then blank spaces until row 13. Row 13 has text "B." Then I have 11 spaces until Row 24, which is text "C". I want the spaces to be filled by the preceding "label" (A, B, C).

I only wish to perform this operation on Column A while keeping all other columns locked. Thank you very much in advance!
 
D

Don Guillett

or
Sub FillSelectionBlanksBelow()
Dim Cell As Range
For Each Cell In Selection
If Cell.Value = "" Then Cell.Value = Cell.Offset(-1, 0).Value
Next Cell
End Sub
 
T

Toby

or
Sub FillSelectionBlanksBelow()
    Dim Cell As Range
    For Each Cell In Selection
        If Cell.Value = "" Then Cell.Value = Cell.Offset(-1, 0).Value
    Next Cell
End Sub

Don - thanks so much for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top