clearing values of cells in named range(s) so the cells are empty

B

BRC

Hi all
I am working on project where i paste data-set into a worksheet
(sheet1) , do several calculations and put the results specific cells
on sheet2. I am using named ranges for the cells in sheet2 that
receive the data. WHat i am trying to figure out is a way to set the
cells in the named ranges on sheet2 to 0 or "" before starting the
routine that does all the calculaions. This way I can be sure that the
data on sheet2 belongs to current set of calculations. Thank you in
advance for any advise. BRC
 
R

Rick Rothstein

Assuming one of the named ranges is name SomeRangeName, then this statement
will clear the values in its cells...

Range("SomeRangeName").ClearContents

Note: The surrounding quote marks are necessary (the argument to the Range
statement is a String value)... just replace my example SomeRangeName with
your actual range's name (or a String variable equal to its name or a String
expression that evaluates to the name).
 

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