Mar 2, 2008
I tried searching for code for each part of the task separately and trying to piece together multiple macros, that did something similar, but Iím not have a lot of luck, so Iíll break it down into two treads, I hope this will follow the rule of one question per post, but if I should have separated this request even farther as two treads, please let me know and Iíll be happy to comply.
View 10 Replies
I was given a spread sheet with a macro that loads data from a SQL Data base (not mine), it returns anywhere from one row to 100ís of rows data. Since itís not my spread sheet and macro, I copied this sheet to my destination workbook. The Data loads in 7 columns starting in B4:H4, with the column headings titles: Acct#, Id#, Name, Qtr1 Totals, Qtr2 Totals, Qtr3 Totals, and Qtr4 Totals. Data cells in spreadsheet not formatted (general)
What Iím trying to do:
I need a macro to copy the data only for columns Id# thru Qtr4 Totals (C5:H5 down thru the last row with data) to another sheet. The destination sheet range starts with rows B13:G13, with formulas below and to the right in columns H13, and J13:N13
(column I is blank).
The formulas below the range are a subtotal of the copied columns (D:G). They could be remove and totaled after theyíre copied, so there's nothing below the copied range? Since I need the column totals as a subtotals, my thought was to have the row heading and formulas already on the destinations sheet and just insert a blank rows between as each row was copied?
As each row of data is copied from the source sheet, I need the macro to copy the formulas to the right of the copied range (H13, and J13:N13) on the destination sheet down for each new row of data copied from the source sheet