ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   referencing ranges using R1C1 format (https://www.excelbanter.com/excel-programming/333920-referencing-ranges-using-r1c1-format.html)

Danny[_8_]

referencing ranges using R1C1 format
 

Range(Cells(5,3),Cells(5,3)) looks fine to me. Post a bit more on what
you have.

Danny


On Thu, 07 Jul 2005 15:55:11 -0700, pwermuth
wrote:


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





--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

pwermuth

referencing ranges using R1C1 format
 

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


STEVE BELL

referencing ranges using R1C1 format
 
This worked for me in Excel 2000
Cells(1, 1).ClearContents

Range(Cells(1,1) = $A$1

But just in case

Range(Cells(1,1),Cells(5,6)) = $A$1:$F$5

for variables (just in case you don't already know how to put in variables)
Cells(rw,col)
Cells(rw+x,col+y)

--
steveB

Remove "AYN" from email to respond
"pwermuth" wrote in
message ...

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





All times are GMT +1. The time now is 07:15 AM.

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