or
[vba]Код
Sub u_724()
Application.ScreenUpdating = False
u = Cells(Rows.Count, 1).End(xlUp).Row
Range("b5:b" & u).Clear
For Each c In Range("a5:a" & u)
If Application.IsText(c) = True And c.Offset(0, 1) = "" Then c.Offset(1, 1) = c.Value
If Application.IsText(c) = False And c.Offset(0, 1) = "" Then c.Offset(0, 1) = c.Offset(-1, 1).Value
Next
'With Range("b5:b" & u)
'.HorizontalAlignment = xlGeneral
'.VerticalAlignment = xlBottom
'.WrapText = True
'End With
Range("b5:b" & u).Borders(xlEdgeLeft).LineStyle = xlContinuous
Range("b5:b" & u).Borders(xlEdgeTop).LineStyle = xlContinuous
Range("b5:b" & u).Borders(xlEdgeBottom).LineStyle = xlContinuous
Range("b5:b" & u).Borders(xlEdgeRight).LineStyle = xlContinuous
Range("b5:b" & u).Borders(xlInsideVertical).LineStyle = xlContinuous
Range("b5:b" & u).Borders(xlInsideHorizontal).LineStyle = xlContinuous
Application.ScreenUpdating = True
End Sub
[/vba]