Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default pls help!! copy -paste to another sheet. getting the sum

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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default pls help!! copy -paste to another sheet. getting the sum

Are you sure you want to use a macro to do this - you could do it without.
If you don't want sheet2 updated in real time - switch off auto clac and
press f9 every time you want it updated. The only down side is that your
sheet2 will have to hold formula to cater for the max size of data ever to
be entered in sheet1. The way I do this is to use an autoformat to check
for the customer ID in the cell above the one being checked and if it is the
same, simply change the colour of the text to white (or whatever your
backgorund colour is), I think you will find this easier on the eye than all
the dashes.

I'm not sure why you want a sheet2, but if the only reason is to remove all
the duplicate cust ids so the reader can easily see when the report is
moving on from one cust to another - then my suggestion will save you this
problem with the added benefit that the cust is still there (you just can't
see it). So if you want to do a sumif or other calc on the data you still
can.

Also have you looked at outlining - it sounds to me that this is what you
want to do and it is built in to Excel - best read the help on this.


"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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default pls help!! copy -paste to another sheet. getting the sum

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/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default pls help!! copy -paste to another sheet. getting the sum

yes they told me that it can be done without macros but i have to do it
in macro :(
i really need some help on this (with code)

thanks for answering
achilleas



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default pls help!! copy -paste to another sheet. getting the sum

mmm - if you know how to do it manually - but "they" tell you it has to be a
macro - then record it using the macro recorder -then it will be in VBA !!

Who are "they" ?


"Gale7" wrote in message
...
yes they told me that it can be done without macros but i have to do it
in macro :(
i really need some help on this (with code)

thanks for answering
achilleas



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



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
Copy and Paste from one sheet to another Stockwell43 Excel Discussion (Misc queries) 3 September 23rd 08 08:06 PM
Copy from one Sheet and paste on another sheet based on condition Prem Excel Discussion (Misc queries) 2 December 24th 07 05:05 AM
Copy Paste to another sheet SallyGirl Excel Worksheet Functions 2 May 10th 07 08:10 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
Copy paste to another sheet HrvojeZagi Excel Discussion (Misc queries) 2 April 2nd 05 05:54 PM


All times are GMT +1. The time now is 08:03 AM.

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"