Board logo

標題: [發問] SUM VBA寫法請教 [打印本頁]

作者: rouber590324    時間: 2015-2-10 11:58     標題: SUM VBA寫法請教

DEAR ALL大大
1 如圖一
Sheet44.Cells(M, 14) = Sheet44.Cells(M, 9) + Sheet44.Cells(M, 10) + Sheet44.Cells(M, 11) + Sheet44.Cells(M, 12) + Sheet44.Cells(M, 13)
1.1想改為  Sheet44.Cells(M, 14) =Application.SUM(...........)
2請問如何修改.煩不吝賜教   THANKS*10000

圖一
Sub TABCDE()
Sheet44.Select
Range("N1").Select
Sheet44.[N2:M65536].ClearContents
For M = 2 To 1000
If 1 = 1 Then
  Sheet44.Cells(M, 14) = Sheet44.Cells(M, 9) + Sheet44.Cells(M, 10) + Sheet44.Cells(M, 11) + Sheet44.Cells(M, 12) + Sheet44.Cells(M, 13)
End If
Next
End Sub
作者: lpk187    時間: 2015-2-10 14:55

Sheet44.Cells(M, 14) =Application.Sum(Range("I" & M & ":M" & M))
作者: rouber590324    時間: 2015-2-10 15:37

DEAR  lpk187 大大
感謝您之指導.測試後完全符合需求 THANKS*10000




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)