Writing formula to worksheet...
I am using VBA to create a new worksheet with summary totals in several
columns that I then want to move over to an already established roll-up worksheet (on a new row). I've accomplished the first part (new worksheet) and have successfully added the new row on the roll-up worksheet. I am now trying to write the "Do Loop" that will write the formulas into the roll-up worksheet. Formulas are required so that when the underlying info changes on the new sheet the roll-up worksheet will automatically reflect the changes. I am using relative references in the code (e.g. R1C1) so that I can increment the column number with each loop. I am drawing a complete blank, however, on what to enter into the cell to get it to work. Help! -- Doug S |
Writing formula to worksheet...
Doug,
Give us the formula and tell us where it goes and someone will translate that into code. Mike "Doug S" wrote: I am using VBA to create a new worksheet with summary totals in several columns that I then want to move over to an already established roll-up worksheet (on a new row). I've accomplished the first part (new worksheet) and have successfully added the new row on the roll-up worksheet. I am now trying to write the "Do Loop" that will write the formulas into the roll-up worksheet. Formulas are required so that when the underlying info changes on the new sheet the roll-up worksheet will automatically reflect the changes. I am using relative references in the code (e.g. R1C1) so that I can increment the column number with each loop. I am drawing a complete blank, however, on what to enter into the cell to get it to work. Help! -- Doug S |
Writing formula to worksheet...
The new sheet (Sheet1) has a revenue summary for each week in the year (53
cells). The formula is nother more than the std SUM()...Say they are in row 1 in columns 1-53. I need to move this number dynamically to Roll-up sheet (Sheet2). Since I am adding the new row and subsequent formulas for each roll-up formula (53), I am trying to write the VBA code to enter a formula into the appropriate Sheet2 cells. Move to the next cell and add the formula, etc. I am trying ask how I can write the Do Loop to incrementally add these formulas (representing Sheet 1 values) across 53 columns on Sheet2. I've this far... ActiveCell.Formula = I don't know how to right what goes AFTER the equal sign. Clear as mud? -- Doug S "Mike H" wrote: Doug, Give us the formula and tell us where it goes and someone will translate that into code. Mike "Doug S" wrote: I am using VBA to create a new worksheet with summary totals in several columns that I then want to move over to an already established roll-up worksheet (on a new row). I've accomplished the first part (new worksheet) and have successfully added the new row on the roll-up worksheet. I am now trying to write the "Do Loop" that will write the formulas into the roll-up worksheet. Formulas are required so that when the underlying info changes on the new sheet the roll-up worksheet will automatically reflect the changes. I am using relative references in the code (e.g. R1C1) so that I can increment the column number with each loop. I am drawing a complete blank, however, on what to enter into the cell to get it to work. Help! -- Doug S |
All times are GMT +1. The time now is 10:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com