![]() |
Summation of rows
Hi. I have a list of numbers in C26 through C36. Cell
C37 sums these. I need for the user to be able to add rows and have the summation cell change accordingly. This works unless the user inserts a row after the last row. Is there a way, through programming or otherwise, to make the formula change even in this situation? I do have a variable in my macro called "lastRow" that records the row number of the summation row (currently 37). Thanks, Mike. |
Summation of rows
Hi Mike,
I think the following formula entered on C37 should help you. =SUM($C$26:OFFSET(C26,-1,0)) I had seen this type of an formula used to a very similar question to your recently. I thought it was a good solution. Hopefully, it works for you too. Regards, Kevin "Mike" wrote in message ... Hi. I have a list of numbers in C26 through C36. Cell C37 sums these. I need for the user to be able to add rows and have the summation cell change accordingly. This works unless the user inserts a row after the last row. Is there a way, through programming or otherwise, to make the formula change even in this situation? I do have a variable in my macro called "lastRow" that records the row number of the summation row (currently 37). Thanks, Mike. |
Summation of rows
Dave,
Thank you! Kevin "Dave Peterson" wrote in message ... I think Kevin meant: =SUM($C$26:OFFSET(C37,-1,0)) |
All times are GMT +1. The time now is 02:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com