Hi All. I have this line of code that looks for Sunday as the last day in the workweek and then add total hours. If Sunday Repeats go to nexx line and perform the function
If UCase(Range("c" & x)) = "SUNDAY" And UCase(Range("c" & x + 1)) <> "SUNDAY" Then 'check if end of week has occurred, skip if there are two successive Sundays
Rows(x + 1).Insert 'insert row
x = x + 1
Range("k" & x) = tot_hrs 'put total hrs worked for the week
tot_hrs = 0 'initalize tot_hrs to 0
End If
the problem with this is that sometimes people last day of work could have been a Saturday and a Sunday entry would not be in the spreadsheet i.E.
Monday
Tuesday
Wednesday
Thursday
Saturday
Friday
Thursday
Saturday
Wednesday
Thursday
What i would like to do is revise the line so as to, when Sunday is not there, then add the lines perform the same function on the last workday prior to Sunday.
Thanks
Bookmarks