Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum variable number of rows

Status
Not open for further replies.

egobbitz

Programmer
Oct 18, 2002
47
US
Hi,
I have a spreadsheet that I am inputting records into, including Date (multiple records, same date) , entry, time, dollar total, item count.
I want to write a VBA routine that places the sum of dollar total, and sum of item count under that particular column. Then, after a blank line, I will continue with the next date(again, multiple records, same date), entry, etc....

Is there a way to do this with VBA?

Any help would be greatly appreciated.

Nick
 
egobbitz,

With Dreamboat's suggestion in mind, consider this question...

Why do we put totals below columns?

In some cases, the requirements dictate such. I would venture a guess that MOST requirements do not!

Totals at the BOTTOM of columns of numbers is a vestage of paper, pencil, & adding machine accounting. In fact, in the "good ol' days", each PAGE often needed a subtotal, and the last page totaled the subtotals. I still see too many accounting applications in Excel that mimic the OLD WAY for no good reason at all!

Why force the user to hunt for the "bottom line" on the last page of a report or to page down to the end, when Excel can put the total right at the top for all the world to see IMMEDIATELY!

I suggest that you get familiar with the SUBTOTAL function. In addition to Data/Subtotals, it can be a powerful summary tool in your bag of tricks. :)

Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top