dm2121
asked on
Total each row for unknown Rows N
How do I total each row (x), for all seven days? The number of rows will continue to increase each week (variable Row N). I'd like to do this in VBA. I need to be able to find the last row (Row N) automatically and sum (Total), for each row.
Row# Sat Sun Mon Tues Wed Thurs Fri Total
1 5 5 5 5 2.5 x
2 0 0 0 0 1.25 x
3 2 3 3 3 4.25 x
4 8 8 8 8 0 x
5 0 0 0 0 8 x
6 6 6 5 5 5 x
7 3 2 4 3 3 x
8 4 12 2.5 2 2 x
9 2 3 1.5 0.5 0 x
10 1 0.5 0 0 2 x
11 5 5 5 5 2.5 x
. 0 0 0 0 1.25 x
. 2 3 3 3 4.25 x
. 8 8 8 8 0 x
. 0 0 0 0 8 x
. 6 6 5 5 5 x
. 3 2 4 3 3 x
. 4 4 2.5 2 2 x
. 2 3 1.5 0.5 0 x
Row N 1 0.5 0 0 2 x
Row# Sat Sun Mon Tues Wed Thurs Fri Total
1 5 5 5 5 2.5 x
2 0 0 0 0 1.25 x
3 2 3 3 3 4.25 x
4 8 8 8 8 0 x
5 0 0 0 0 8 x
6 6 6 5 5 5 x
7 3 2 4 3 3 x
8 4 12 2.5 2 2 x
9 2 3 1.5 0.5 0 x
10 1 0.5 0 0 2 x
11 5 5 5 5 2.5 x
. 0 0 0 0 1.25 x
. 2 3 3 3 4.25 x
. 8 8 8 8 0 x
. 0 0 0 0 8 x
. 6 6 5 5 5 x
. 3 2 4 3 3 x
. 4 4 2.5 2 2 x
. 2 3 1.5 0.5 0 x
Row N 1 0.5 0 0 2 x
ASKER
Thanks byundt for the quick response!
It seems to work, but I'd like it to find the last row and sum the days from row 2 to Row N; not Row N+1. This week I could have 500 rows and need to total the days; next week it will grow to1149 rows; I don't need to go down 10,000. I don't want to have "0" in the total after Row N+1.
dm2121
It seems to work, but I'd like it to find the last row and sum the days from row 2 to Row N; not Row N+1. This week I could have 500 rows and need to total the days; next week it will grow to1149 rows; I don't need to go down 10,000. I don't want to have "0" in the total after Row N+1.
dm2121
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
byunt,
You are correct! Your solution is perfect and works as planned!
Please disregard my first comment; the problem came from my end.
Thank you very much for your great expertize!
Regards,
dm2121
You are correct! Your solution is perfect and works as planned!
Please disregard my first comment; the problem came from my end.
Thank you very much for your great expertize!
Regards,
dm2121
Open in new window