EXCEL VBA优化 http://zhidao.baidu.com/question/1175885929211894219.html
把代码放在工作表模块中,码改这样数据有更新变化就会自动触发代码运行。码改在线编辑 源码代码更改如下Private Sub Worksheet_SelectionChange(ByVal Target As Range)Dim lRow As Long,码改清迈到曼谷源码 i As Long, myRng As Range
If Not Intersect(Target, Range("K8:M")) Is Nothing Then
lRow = Cells(Rows.Count, "M").End(xlUp).Row
Set myRng = Range("K7:M7")
For i = 8 To lRow
If Cells(i, "M") <> "/" Then
Set myRng = Union(myRng, Range("K" & i & ":" & "M" & i))
End If
Next i
myRng.Copy Sheet2.Range("A1")
End If
End Sub
2024-12-23 06:36
2024-12-23 06:08
2024-12-23 05:36
2024-12-23 05:02
2024-12-23 05:01