I'm using the below code that add a total to the last row of Columns F and G. How can I adjust this to total up Columns F and G on each row and place in Column H?
![]()
Please Login or Register to view this content.
I'm using the below code that add a total to the last row of Columns F and G. How can I adjust this to total up Columns F and G on each row and place in Column H?
![]()
Please Login or Register to view this content.
I've attached the workbook. Look at the Module named November
This works;
![]()
Please Login or Register to view this content.
If I helped in any way, please click the star
It's totaling everything though, I'll keep working on it. Thanks for your help
Yes, it totals every row, down to the last row. Given your first post, that seems to be what you wanted.
However, if your last row is a grand total of each column (and you don't want to total those) then change this;
to this;![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
I only need to total the rows below the cells of October and November ...
Then instead of ;
set the rows as a fixed range. Something like;![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
It can't be fixed because the report will always grow month to month
The code below is almost what I need, but it's adding zero's some cells
![]()
Please Login or Register to view this content.
Obviously you got a different code elsewhere, but I see nothing wrong with this new code you acquired. If you are getting extra zero's in some cells, then check the format of those cells. I'll bet your answer is there.
BTW, you don't need this line in the code, it does nothing;
Another observation ...![]()
Please Login or Register to view this content.
These lines do the same thing, but the line you have;
is based on older versions of excel.![]()
Please Login or Register to view this content.
This is a better way of doing the above and achieving the same result, but is more efficient (especially for the newer excel versions that have over 1 million rows).
![]()
Please Login or Register to view this content.
Last edited by Jim885; 11-21-2014 at 10:49 AM. Reason: Another observation ...
Solved with the following
![]()
Please Login or Register to view this content.
Honestly, that code is bad. But as long as you're happy with it.
Your code line from above;
is a superfluous and garbled version of what I gave you in post #3, which was;![]()
Please Login or Register to view this content.
and don't get me started on that second line that you think is a gem!![]()
Please Login or Register to view this content.
![]()
Last edited by Jim885; 11-23-2014 at 12:25 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks