Pianostool
New Member
- Joined
- Dec 4, 2008
- Messages
- 13
- Office Version
- 365
- Platform
- Windows
Hi folks.
I have written some code to allow data input through a form. One of the fields is a $ amount.
Each time an entry gets added through the form, it adds a new row in at Row 7, so all other rows of prior data drop down below it.
I have a total of the $ column in cell C5, and some code that totals it all OK as rows get added, as part of the form code.
The $ values are in Column B and the new record gets added each time to Row 7. So the newest dollar value is at B7, and all other $ values from previous entries are below it in column B, but obviously the list grows.
So my code total in C5 works fine, giving me the correct answer, but it's just a figure (the code is doing the formula itself).
I'm wondering how I might get the SUM formula input into C5 via the code, so it's adding from B7 down to the first blank cell in column B?
I need it as a formula rather than a figure, as the users may change one of the $ values in column B later, manually, and this will not update the total if it's just a figure from the last form input run.
I hope that makes sense.
Thanks in advance.
I have written some code to allow data input through a form. One of the fields is a $ amount.
Each time an entry gets added through the form, it adds a new row in at Row 7, so all other rows of prior data drop down below it.
I have a total of the $ column in cell C5, and some code that totals it all OK as rows get added, as part of the form code.
The $ values are in Column B and the new record gets added each time to Row 7. So the newest dollar value is at B7, and all other $ values from previous entries are below it in column B, but obviously the list grows.
So my code total in C5 works fine, giving me the correct answer, but it's just a figure (the code is doing the formula itself).
I'm wondering how I might get the SUM formula input into C5 via the code, so it's adding from B7 down to the first blank cell in column B?
I need it as a formula rather than a figure, as the users may change one of the $ values in column B later, manually, and this will not update the total if it's just a figure from the last form input run.
I hope that makes sense.
Thanks in advance.