Actually, you can get most of what you want by copying the sheet and then
select your data and do Data=Subtotals and use cust_id as the grouping
column and price to be summed.
This doesn't require any programming. Try it out and see if it is
sufficient.
You could collapse the data (using the outline buttons on the left side) so
you see only the sums, then select the range and do Edit=Goto = Special
Cells and select visible. Then perhaps you can use a border format setting
to achieve the visual separation you want.
--
Regards,
Tom Ogilvy
"Gale7" wrote in message
...
hello, i am a new member in excelforum and a newbi in programming with
macros.
i have the following problem
i have five columns in excel sheet1 (A, B, C, D, E) - (cus_id,
cus_name, date, product, price,)
i want to put a command button where, when i press it, to appear in
sheet2 all the data (rows) leaving a (----------------) every time the
cus_id changes.
finaly i want to take (in sheet2) the sum of each customer, depending
on the customer id.
thnxs in advance
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/