1个回答
展开全部
Sub s()
ct = 2
k = 1
Do While [g1:j3].Item(k) <> ""
If k > 12 Then
Exit Sub
Else
k = k + 1
End If
Loop
t = Cells(Rows.Count, ct).End(3)
n = Cells(Rows.Count, 11).End(3).Row
For i = 11 To 353
If Cells(n - 3, i) - Cells(n - 2, i) = 1 And Cells(n - 2, i) - Cells(n - 1, i) = 1 And Cells(n - 1, i) - Cells(n, i) = 1 Or Cells(n - 2, i) - Cells(n - 3, i) = 1 And Cells(n - 1, i) - Cells(n - 2, i) = 1 And Cells(n, i) - Cells(n - 1, i) = 1 Then
[g1:j3].Item(k) = t
k = k + 1
If k > 12 Then Exit Sub
End If
Next
End Sub
追问
相连5个单元
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询