Writing formula to worksheet...

D

Doug S

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!
 
M

Mike H

Doug,

Give us the formula and tell us where it goes and someone will translate
that into code.

Mike
 
D

Doug S

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top