色付きセルのみを合計する [SumColor]
http://takashixxx.blog88.fc2.com/blog-entry-41.html
Function SumColor(計算範囲, 条件色セル)
SumColor = 0
For x = 1 To 計算範囲.Rows.Count
If 計算範囲.Rows(x).Interior.ColorIndex = 条件色セル.Interior.ColorIndex Then
SumColor = SumColor + 計算範囲.Rows(x)
End If
Next
End Function
Function SumColor(計算範囲, 条件色セル)
SumColor = 0
For x = 1 To 計算範囲.Rows.Count
If 計算範囲.Rows(x).Interior.ColorIndex = 条件色セル.Interior.ColorIndex Then
SumColor = SumColor + 計算範囲.Rows(x)
End If
Next
End Function