1.EXCEL VBA优化 http://zhidao.baidu.com/question/1175885929211894219.html
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