ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Translating A1 format to R1C1 format addresses? (https://www.excelbanter.com/excel-programming/378412-translating-a1-format-r1c1-format-addresses.html)

(PeteCresswell)

Translating A1 format to R1C1 format addresses?
 
I'm in VBA, creating spreadsheets.

Have fallen into the habit of making the created spreadsheet's column format
"R1C1". Much more convenient for iterating through columns and rows....

But when I create a .Range and then take .Address, it comes back in "$A$1:$B$1"
format.

Am I getting the .Address the wrong way?

Or do I need to be able to translate the address to RowColumn format?
--
PeteCresswell

(PeteCresswell)

Translating A1 format to R1C1 format addresses?
 
Per (PeteCresswell):
Am I getting the .Address the wrong way?

Or do I need to be able to translate the address to RowColumn format?


Oops!

Got it.
--------------------------------------------
?myDataRange.Address(ReferenceStyle:=xlR1C1)
R2C1:R14C4
--------------------------------------------
--
PeteCresswell


All times are GMT +1. The time now is 01:26 PM.

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