ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   R1C1 format using a variable? (https://www.excelbanter.com/excel-discussion-misc-queries/48500-r1c1-format-using-variable.html)

jim37055

R1C1 format using a variable?
 

Is it possible to use a variable to designate the column in R1C1 format?


If so, what is the proper way to do it?


Example:

R5C"my variable goes here"


--
jim37055
------------------------------------------------------------------------
jim37055's Profile: http://www.excelforum.com/member.php...o&userid=27788
View this thread: http://www.excelforum.com/showthread...hreadid=472969


JE McGimpsey

One way:

=INDIRECT("R5C" & myVar,FALSE)

Another way:

=INDEX(R5,myVar)

In article ,
jim37055
wrote:

Is it possible to use a variable to designate the column in R1C1 format?


If so, what is the proper way to do it?


Example:

R5C"my variable goes here"


bj

check out indirect() in help

"jim37055" wrote:


Is it possible to use a variable to designate the column in R1C1 format?


If so, what is the proper way to do it?


Example:

R5C"my variable goes here"


--
jim37055
------------------------------------------------------------------------
jim37055's Profile: http://www.excelforum.com/member.php...o&userid=27788
View this thread: http://www.excelforum.com/showthread...hreadid=472969



jim37055


Thanks guys, that worked.


--
jim37055
------------------------------------------------------------------------
jim37055's Profile: http://www.excelforum.com/member.php...o&userid=27788
View this thread: http://www.excelforum.com/showthread...hreadid=472969



All times are GMT +1. The time now is 09:51 PM.

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