View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JP Ronse JP Ronse is offline
external usenet poster
 
Posts: 174
Default Clear a range of cells given 2 Cell addresses

Hi Ekareem,

Try ...

range(cells(r1,c1), cells(r2,c2)).clearcontents.

With kind regards,

JP


"ekareem" wrote in message
...
Hi
I want to be a able to clear a rectangular area.
I know the top most left corner address.
I know the bottom righ corner address.
all addresses are in the format r,c where r,c are integers.
So I know cell 1 to have coordinates (r1,c1) and cell 2 to have
coordinates
(r2,c2).

How can I issue a clear command to clear all data and formulas in this
region?

Thanks much in advance.

Ekareem