rIncDay.row ' will return the row number
dim sum_sales as variant
sum_sales=0
For Each rIncDay In Range("W8:W149") 'Need Last Row loop
sum_sales=sum_sales+range("d" & rIncDay.row).value 'adding the
column
Select Case (rIncDay)
'-------------------------
'Days of the week
Case "SUNDAY"
iSun = iSun + 1
Case "MONDAY"
iMon = iMon + 1
Case "TUESDAY"
iTue = iTue + 1
Case "WEDNESDAY"
iWed = iWed + 1
Case "THURSDAY"
iThu = iThu + 1
Case "FRIDAY"
iFri = iFri + 1
Case "SATURDAY"
iSat = iSat + 1
'-------------------------
Case Else
iOther = iOther + 1 'Error trap not in SELECT CASE
'-------------------------
End Select
Next rIncDay
msgbox sum_sale
--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile:
http://www.excelforum.com/member.php...fo&userid=1627
View this thread:
http://www.excelforum.com/showthread.php?threadid=38260