返回列表 上一主題 發帖

重新編號

回復 1# myleoyes
  1. Sub changeindex()
  2. Dim mydic As Object
  3. Dim mycell As range
  4. Dim i As Integer

  5. Set mydic = CreateObject("scripting.dictionary")

  6. For Each mycell In range([c153], [c153].End(xlToRight))

  7. If mydic.exists(mycell.Value) Then
  8. mycell.Value = mydic(mycell.Value)
  9. Else
  10. i = i + 1
  11. mydic(mycell.Value) = i
  12. mycell.Value = mydic(mycell.Value)
  13. End If
  14. Next

  15. Set mydic = Nothing

  16. End Sub
複製代碼
現在要理解發問者的意思,比寫程式更困難
80 字節以內
不支持自定義 Discuz! 代碼

TOP

        靜思自在 : 難行能行,難捨能捨,難為能為,才能昇華自我的人格。
返回列表 上一主題