klitton7
asked on
Need help modifying an existing macros to allow for subtotals if there are 59 rows in the document
Glen Ray assisted with a macro recently that I need help tweeking. The macro adds subtotals and a grand total which can be applied and removed as additional data is entered using two different controls.
It seems that all is well when we have at least 60 rows of data, but if I have 59 or less, then the subtotal and grand total on the last page returns a circular reference error. If I add data to row 60, everything works as expected.
Also, when only 59 rows are entered, the row formatting (borders) are not appearing at the top of the 2nd page - 1st row of data.
I have attached the file.
H--Documents-Bad-Debt-Log---Sylvia-Dorma
It seems that all is well when we have at least 60 rows of data, but if I have 59 or less, then the subtotal and grand total on the last page returns a circular reference error. If I add data to row 60, everything works as expected.
Also, when only 59 rows are entered, the row formatting (borders) are not appearing at the top of the 2nd page - 1st row of data.
I have attached the file.
H--Documents-Bad-Debt-Log---Sylvia-Dorma
ASKER
Thanks Glen - just one formatting issue to address if you don't mind.
In the file you sent me, I removed rows 60 and greater, then used the "insert total rows" control.
I notice that on page two, the borders do not appear on the top of the first row. Can you adjust that for me if you don't mind?
In the file you sent me, I removed rows 60 and greater, then used the "insert total rows" control.
I notice that on page two, the borders do not appear on the top of the first row. Can you adjust that for me if you don't mind?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Glenn!
You're welcome. Sorry for the confusion.
Open in new window
The changes are in lines 27 & 30 and the removal of the original code above line 33 (that's where the real error was occurring).
Updated example file attached.
EE-H-Documents-BadDebtLogMaster-2c.xls