Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A VB Code instead of a pivot & sobtotals

Hello,
I have a data table consisiting of different products with
sales amounts & volumes. Any product can be included many
times. What I want to do, is to add up the amounts or
volumes of the same product. Using a pivot table,
subtotals in the VB code, slows down the process. Is
there any other way to produce a more efficient visual
basic code? The table and the result I want to achive:

Product Amount Volume
A 5 100 Eur
A 10 200 Eur
B 10 300 Eur
B 20 600 Eur The RESULT should be:

Product Amount Volume
A 15 300 Eur
B 30 900 Eur

Many Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default A VB Code instead of a pivot & sobtotals

Hozkurt,

You might use the SumIf formula in the sheet
Say your table is in cells A1:C5

Say you put A in cell A10 and B in cell A11
than in B10
==SUMIF($A$1:$A$5,$A10,$B$1:$B$5)
than fill this down to A11
you can also use it in C by changing the B's, but I'm not
sure how this will work adding Euro's.
Be sure to watch the $ signs...

If you have a long table with lots of Products you can use the
Data Filter Advanced Filter to copy unique Product names to
another place in the worksheet and than put the formulas next to this list
but be sure to change $A10 to refer to this new list.
--
sb
"Hozkurt" wrote in message
...
Hello,
I have a data table consisiting of different products with
sales amounts & volumes. Any product can be included many
times. What I want to do, is to add up the amounts or
volumes of the same product. Using a pivot table,
subtotals in the VB code, slows down the process. Is
there any other way to produce a more efficient visual
basic code? The table and the result I want to achive:

Product Amount Volume
A 5 100 Eur
A 10 200 Eur
B 10 300 Eur
B 20 600 Eur The RESULT should be:

Product Amount Volume
A 15 300 Eur
B 30 900 Eur

Many Thanks,



Reply
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
Alter pivot with code Steve Excel Discussion (Misc queries) 0 November 7th 07 09:23 PM
VBA Code with Pivot tables [email protected] Excel Discussion (Misc queries) 2 April 19th 07 05:21 PM
Pivot Table Code FA Excel Discussion (Misc queries) 6 October 11th 05 04:03 PM
Pivot Table VBA code to move a row uclawarren Excel Discussion (Misc queries) 0 October 10th 05 08:49 PM
HELP! Code for Pivot Table Sandy[_3_] Excel Programming 6 September 3rd 03 09:43 PM


All times are GMT +1. The time now is 09:18 PM.

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

About Us

"It's about Microsoft Excel"