Formula to Convert Text Range Into R1C1 Style ?

Ken1000

Active Member
Joined
Sep 28, 2003
Messages
315
Hi. I typically do not use the R1C1 reference style when composing
formulas. But I am wondering if you are aware of any excel formula or,
if necessary, a VBA solution, that would "convert" a specified range into
R1C1 format ?

Example. Cell F1 has text entry "D31:D50". I'd like this same text range
to show in cell F2, in R1C1 style. That is, with the proper formula entered
into cell F2, (or by means of some VBA code), the visible results would yield
"R31C4:R50C4" in F2.

Thank you for any help along these lines.

Ken
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
You can switch between R1C1 style and A1 style in Tools, Options, General.

Also, you can view the formulas in your worksheet instead of the values by pressing Control-`

Hope that helps!
 
Upvote 0
Hi

the following UDF should give you what you are chasing.
Code:
Function myfunc(ra As Range)
 myfunc = Range(ra.Value).Address(ReferenceStyle:=xlR1C1)
End Function

Using your data in F1 the formula
=myfunc(F1)
in F2 gave R31C4:R50C4

HTH

Tony
 
Upvote 0
Tazguy, thank you. I already knew about that capability.
Thank you, acw, for the helpful code.

It's nice to have such high caliber help.

Ken
 
Upvote 0
Hello,

Just for the future refrence. Here is the general way as I found.

Code:
Application.ConvertFormula("your Formula",xlA1,xlr1c1)
First one is the formula type your formula have and the second one, the formula type you want.
if your formula is in a cell, use
Code:
yourcell.fromula
Regards,
M
 
Upvote 0

Forum statistics

Threads
1,226,125
Messages
6,189,133
Members
453,525
Latest member
compugor

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top