
07-07-2005, 10:05 PM
|
|
|
|
Re: referencing ranges using R1C1 format
this clears a1 in excel 2k3
Cells(1, 1).ClearContents
this clears a1:b2
Range(Cells(1, 1), Cells(2, 2)).ClearContents
--
Gary
"pwermuth" <pwermuth.1rtqmx_1120781133.0799@excelforum-nospam.com> wrote in
message news:pwermuth.1rtqmx_1120781133.0799@excelforum-nospam.com...
>
> Hello,
>
> this might be a very basic problem but I cannot find the solution to it
> in Excel Help.
>
> There are many instances when I need to use Range instead of Cell to
> refer to a cell. For example methods such as ClearContents only work
> on Range not on Cell.
> However, it seems as if Range only takes the A1 format which drives me
> crazy. Most of the time I am looping through rows and columns and
> therefore will have their integer values, i.e. the location of a cell
> or array in R1C1 format but not in the A1 format.
>
> How can I refer to cell R5C3 for example using Range? Supposedly there
> is a second syntax for Range which should work as follows
> Range(Cells(5,3),Cells(5,3)) but whenever I try to use that I get
> runtime errors. Am I getting this wrong and is there another, better
> method to quickly convert a simply R1C1 format address into A1 format
> or to use Range with the R1C1 format?
>
> Thanks for your help,
>
> Peter
>
>
> --
> pwermuth
> ------------------------------------------------------------------------
> pwermuth's Profile:
> http://www.excelforum.com/member.php...o&userid=24997
> View this thread: http://www.excelforum.com/showthread...hreadid=385424
>
|