ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   group summary totals (https://www.excelbanter.com/excel-programming/374681-group-summary-totals.html)

childofthe1980s

group summary totals
 
Hello:

A few days ago, a very nice person out here on the message board showed me
how a macro could be developed in Excel to automatically total a column in
Excel without the end user's having to click the @SUM button. This was
great, considering that this Excel data had been imported from another
application and the totaling of the column therefore had to be automatic upon
the dumping of data to Excel.

Now, in the same vein, I need to find a way to have Excel automatically
total the grouping of data within the spreadsheet. This grouping is similar
to the grouping that could be conducted through Crystal Reports or through
SQL Reporting Services.

The group would be based on the vendor IDs appearing in a column of the
srpeadsheet. In other words, the amounts in the spreadsheet would be grouped
and subtotaled by the vendor ID column.

Is it possible to develop a macro that would automatically do this after the
data is dumped to Excel? And, if so, how?

Thanks!

childofthe1980s

Tom Ogilvy

group summary totals
 
Dump the Data

Turn on the macro Recorder (tools=Macro=Record a New Macro)

Select the upper left corner of you data then do
Data=SubTotal

Walk through the wizard.

when the Subtotals have been applied, then turn off the macro recorder and
look at the recorded code. You can then generalize it to suit your needs.

--
Regards,
Tom Ogilvy



"childofthe1980s" wrote:

Hello:

A few days ago, a very nice person out here on the message board showed me
how a macro could be developed in Excel to automatically total a column in
Excel without the end user's having to click the @SUM button. This was
great, considering that this Excel data had been imported from another
application and the totaling of the column therefore had to be automatic upon
the dumping of data to Excel.

Now, in the same vein, I need to find a way to have Excel automatically
total the grouping of data within the spreadsheet. This grouping is similar
to the grouping that could be conducted through Crystal Reports or through
SQL Reporting Services.

The group would be based on the vendor IDs appearing in a column of the
srpeadsheet. In other words, the amounts in the spreadsheet would be grouped
and subtotaled by the vendor ID column.

Is it possible to develop a macro that would automatically do this after the
data is dumped to Excel? And, if so, how?

Thanks!

childofthe1980s



All times are GMT +1. The time now is 12:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com