- Joined
- Apr 6, 2006
- Messages
- 40
- Reaction score
- 1
Within an excel worksheet, I am keeping track of the hours I work per day in a week.
I only work part-time right now so the number of columns I have in the worksheet vary. I would like to
write a macro that will determine the # of columns and include this info in a macro inserted sum Formula
at the bottom of the list of hours.
I have determined the # of columns via a Do loop and stored this in an int variable, however, I have not been able to get the sum formula to accept a value via a variable resulting in a run-time error,
application-defined or object-defined error.
Thank you very much for the help. It is much appreciated.
Sincerely,
Smithb2
I only work part-time right now so the number of columns I have in the worksheet vary. I would like to
write a macro that will determine the # of columns and include this info in a macro inserted sum Formula
at the bottom of the list of hours.
I have determined the # of columns via a Do loop and stored this in an int variable, however, I have not been able to get the sum formula to accept a value via a variable resulting in a run-time error,
application-defined or object-defined error.
Thank you very much for the help. It is much appreciated.
Sincerely,
Smithb2