LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,358
Default VBA Program to calculate Subtotals



I have tried different methods to achieve this (pivot tables etc) but I
don't get the required result in the right format.



I have a workbook with the first Sheet named "Totals". The rest of the
worksheets "Sheet2, Sheet3 ..etc" have a description in "Column A" and a
quantity in "Column B"



Example:-



"Sheet 2"

Col A ----- Col B

ITEM01 ----- 2

ITEM03 ----- 1

ITEM01 ----- 2

ITEM02 ----- 5

ITEM06 ----- 0

ITEM05 ----- 10



"Sheet 3"

ITEM01 ----- 1

ITEM02 ----- 1

ITEM05 ----- 2

ITEM04 ----- 2



I require a macro to compare the descriptions and add the quantities of each
description and show the summary on the totals page. The following needs to
be taken into account.

a) New worksheets might be added so the macro wants to look in every
worksheet apart from the first one "Totals"

b) If the description has a quantity of 0 it wants to be ignored and not
added to the Totals page.



When running the macro I would like to see the following results on the
Totals page.

"Totals"

ITEM01 ----- 5

ITEM02 ----- 6

ITEM03 ----- 1

ITEM04 ----- 2

ITEM05 ----- 12



Like I mentioned I have used pivot tables but the format in inappropriate
and new worksheets might be added, also I want this user friendly.

Has anyone done anything like this before, this macro would be very useful
to much appreciated.



Thanks

John








 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) AndyCotgreave Excel Discussion (Misc queries) 3 October 24th 07 11:32 AM
Original subtotals should not be within nested subtotals in excel Mirage Excel Worksheet Functions 1 June 6th 07 01:37 AM
How to calculate percentage of values of subtotals Alicia Excel Discussion (Misc queries) 5 February 15th 06 02:04 PM
Program to calculate how much I can afford to spend? Looking to start over Excel Discussion (Misc queries) 3 November 30th 05 10:12 PM
Problem with nested subtotals, placing secondary subtotals BELOW . Dawn Cameron Excel Discussion (Misc queries) 1 June 3rd 05 10:13 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"