本帖最后由 jasmineamber 于 2015-12-30 14:51 编辑
感觉这个表有问题, 既然以C列作为标准, 为什么C里面还有重复的数据, 这有什么意义吗?
[mw_shl_code=python,true] For i = 1 To Range("A1").End(xlDown).Row Step 1
For j = 1 To Range("C1").End(xlDown).Row Step 1
If Cells(i, 1).Value = Cells(j, 3) Then
With Cells(i, 1).Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
ActiveSheet.Hyperlinks.Add Anchor:=Cells(i, 1), Address:="", SubAddress:="Sheet1!" & Cells(j, 3).Address(0, 0), TextToDisplay:=Cells(i, 3).Value
Exit For
End If
Next
Next[/mw_shl_code] |