Macro fills a blank cell (IN THE COLUMN in which you start the macro) with the value of the cell above it:
Return to List
' This allows tables to be created and filled in -- by simply putting the values in the table when they change.
Public Sub Main()
On Error GoTo BYE
' This macro duplicates the cells above if there are any empty. Btn = MsgBox("Start macro at the top of any column." + Chr(13) + Chr(13) + _
"Are you ready to PROCEED?", vbOKCancel, " STARTUP MESSAGE")
If Btn = vbCancel Then GoTo BYE
MaxRow = Selection.Information(wdMaximumNumberOfRows)
COPY_CELL_LOOP:
WordBasic.NextCell
CurrentRow = Selection.Information(wdStartOfRangeRowNumber)
If CurrentRow > MaxRow Then GoTo BYE
WordBasic.PrevCell
If Len(Selection.Text) = 2 And Val(Selection.Text) = 0 Then
Selection.InsertAfter Text:=Temp
Else
Temp = Selection.Text
End If
Selection.START = Selection.End
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdMove
GoTo COPY_CELL_LOOP
BYE:
End Sub