2012年7月5日星期四

VBA for fill blank cell



13130 computer AT-2 hp11 cpu PCS 2
hp22 laptor PCS 2
hp333 server PCS 1

hp3300 printer PCS 1


Sub fill_blank()
Dim i As Integer
Dim s, t As String
For i = 2 To 1443
If Len(Cells(i, 1)) > 1 Then
s = Cells(i, 1)
t = Cells(i, 2)
Else
Cells(i, 1).Value = s
Cells(i, 2).Value = t
End If
Next i
End Sub

没有评论: