Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Copy and Paste Help - Macro and VBA Newbie
I have a report that is generated daily. Each row of the report can be
divided into 15 separate items with each item having 6 sub items. All of this is on one row. For example on my sheet labled "data" cell C2 = item 1a, D2 = item 1b, E2 = item 1c, F2 = item 1d, G2 = item 1e, and H2 = item 1f all the way to CN2 = item 15g. On my "Report" Sheet cell c2 from the Data sheet needs to be pasted in cell C8 of Report Sheet , cell D2 from the Data sheet needs to be pasted in cell D8 of Report Sheet, Data E2 = Report E8, Data F2 = Report F8, Data G2 = Report G8, and Data H2 = Report H8. Then if there is some data in Data sheet I2 place that on Reports page C9 and so on until an empty column is hit or Data Cell CN2 is hit. Once an empty cell or CN2 is reached then the macro would start over on Data cell C3 and continue. This would continue until the end of the data is reached. There is a catch on the Report sheet it is segmented every 25 rows. So Rows 8-32, Rows 38-62 ...etc. I know I was long winded but I have absolutely no idea how to do this other than doing it manually and I don't want to do that. In a perfect world there would be a button I press on the Reports sheet and it does it for me! Any help would be greatly appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Copy and Paste Help - Macro and VBA Newbie
You can use the Copy method as:
<SourceRangeObject.Copy <DestinationRangeObject Just be sure to prequalify your ranges to avoid ambiguity, which my suggestion is to go all the way back to the workbook object or use a range object variable that has been set to the proper range with the prequalified objects at the time of being set. -- Thanks, Ronald R. Dodge, Jr. Production Statistician Master MOUS 2000 "gatorcc" wrote in message ... I have a report that is generated daily. Each row of the report can be divided into 15 separate items with each item having 6 sub items. All of this is on one row. For example on my sheet labled "data" cell C2 = item 1a, D2 = item 1b, E2 = item 1c, F2 = item 1d, G2 = item 1e, and H2 = item 1f all the way to CN2 = item 15g. On my "Report" Sheet cell c2 from the Data sheet needs to be pasted in cell C8 of Report Sheet , cell D2 from the Data sheet needs to be pasted in cell D8 of Report Sheet, Data E2 = Report E8, Data F2 = Report F8, Data G2 = Report G8, and Data H2 = Report H8. Then if there is some data in Data sheet I2 place that on Reports page C9 and so on until an empty column is hit or Data Cell CN2 is hit. Once an empty cell or CN2 is reached then the macro would start over on Data cell C3 and continue. This would continue until the end of the data is reached. There is a catch on the Report sheet it is segmented every 25 rows. So Rows 8-32, Rows 38-62 ...etc. I know I was long winded but I have absolutely no idea how to do this other than doing it manually and I don't want to do that. In a perfect world there would be a button I press on the Reports sheet and it does it for me! Any help would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
[newbie] Macro for "copy and paste" | Excel Discussion (Misc queries) | |||
Copy row Macro Help for VBA Newbie | Excel Programming | |||
Macro to copy and paste values (columns)I have a macro file built | Excel Programming | |||
Macro newbie - simple copy/paste function | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming |