1个回答
展开全部
Sub s()
ceto = 2
t = Cells(Rows.Count, ceto).End(3)
n = Cells(Rows.Count, 11).End(3).Row
Set d = CreateObject("scripting.dictionary")
For i = 11 To 353
j = 1
Do While d.Count < 5
d(Cells(n - j, i).Text) = ""
j = j + 1
Loop
If d.exists(Cells(n, i).Text) Then
Cells(1, i) = t
End If
d.RemoveAll
Next
End Sub
追问
在第一单元插入内容
如单元有内容,继续插入内容
追答
Sub s()
ceto = 2
t = Cells(Rows.Count, ceto).End(3)
n = Cells(Rows.Count, 11).End(3).Row
Set d = CreateObject("scripting.dictionary")
For i = 11 To 353
j = 1
Do While d.Count < 5
d(Cells(n - j, i).Text) = ""
j = j + 1
Loop
If d.exists(Cells(n, i).Text) Then
Cells(1, i) = Cells(1, i) & t
End If
d.RemoveAll
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |