MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Macros-editing worksheet without editing macro


Posted by Sarah on January 04, 2001 11:12 AM

I would like to create a macro that rolls the current year data to the prior year column on a two year financial statement and zeroes out the current year column. We add and delete rows constantly on the statments. My question is: Is there a way that I can zero out a range of cells in a macro that will let me add and delete rows in the worksheet and automatically modify the macro to zero out the new range?


Posted by Celia on January 04, 2001 2:15 PM


Have you tried using the macro recorder to record what you want to do?
Celia

Posted by Dave on January 04, 2001 5:01 PM


Hi Sarah

Not sure if I understand you but..

This bit of code will place zeros in all the cells with the range A1:A100 of the activesheet.

Range("A1:A100").FormulaR1C1 = "0"

OzGrid Business Applications