2016-06-07 63 views

回答

1
MsgBox ActiveSheet.Evaluate(_ 
"SUMIFS($H$15:$H$12729,$F$15:$F$12729,""<> 52202001"", $F$15:$F$12729,""<> 51701001"")") 

編輯:

Private Sub Worksheet_Change(ByVal Target As Range) 
    Dim v 
    If Not Application.Intersect(Target, Me.Columns(1)) Is Nothing Then 

     v = Me.Evaluate("SUMIFS($H$15:$H$12729,$F$15:$F$12729,""<> 52202001"", $F$15:$F$12729,""<> 51701001"")") 

     ThisWorkbook.Sheets("Sheet2").Range("A1").Value = v 

    End If 

End Sub 
+0

感謝添:用於片材與數據的工作表的代碼模塊中。你真的是最好的。還有一件事,如果我想在這個區域的每一個變化(A列)上得到這個總和,並且在sheet2上顯示這個數字,我會添加什麼? – Brad