ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   clearing values of cells in named range(s) so the cells are empty (https://www.excelbanter.com/excel-programming/438211-clearing-values-cells-named-range-s-so-cells-empty.html)

BRC[_2_]

clearing values of cells in named range(s) so the cells are empty
 
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

Rick Rothstein

clearing values of cells in named range(s) so the cells are empty
 
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).

--
Rick (MVP - Excel)


"BRC" wrote in message
...
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




All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com