Sub test7a()
Dim myRange As Range
Set myRange = Application.InputBox("Enter range to sum:", , , , , , , 8)
If Application.WorksheetFunction.Sum(myRange) < 7 Then MsgBox "Sum less than 7"
End Sub
Public Sub TestForSumOf7()
Dim SumRng As Range
'SET TOP AND BOTTOM ROWS THAT YOU WANT SUM'd
TopRow = 3
BottomRow = 5
'LOOP THRU EACH COLUMN THAT YOU WANT SUM'd
For Col = 1 To 3
' SET THE RANGE to the CURRENT COLUMN and SPECEFIED ROWS
Set SumRng = Range(Cells(TopRow, Col), Cells(BottomRow, Col))
'TEST SUM WITHIN SPECIFIED RANGE of CURRENT COLUMN
If WorksheetFunction.Sum(SumRng) = 7 Then _
MsgBox "Time Off is seven for " & SumRng.Address
Next Col
End Sub