返回列表 上一主題 發帖

[發問] 範圍值內如何同步變動?

回復 1# renzhi2020

1.參考看看
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.     Dim KeyCells As Range
  3.     Set KeyCells = Range("A1:A5")
  4.     Set IntersectCells = Application.Intersect(KeyCells, Range(Target.Address))
  5.     If Not IntersectCells Is Nothing Then
  6.         For Each a In IntersectCells
  7.             Cells(a.Row, "B") = "=A" & a.Row & "*5"
  8.         Next
  9.     End If
  10. End Sub
複製代碼
2.衍申問題的意思是例如:
工作表1的A1變動
工作表2的B1填入=工作表1!A1*5
是舉例的這樣嗎?

TOP

        靜思自在 : 要用心,不要操心、煩心。
返回列表 上一主題