Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get row number from R[4]C
I need to get the integer value from the address R[4]C, any ideas ?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get row number from R[4]C
I'm not quite sure how you got this string, but this worked ok for me:
Option Explicit Sub testme() Dim myStr As String Dim OpenBrktPos As Long Dim CloseBrktPos As Long myStr = "R[433]C" OpenBrktPos = InStr(1, myStr, "[", vbTextCompare) CloseBrktPos = InStr(1, myStr, "]", vbTextCompare) Debug.Print Mid(Left(myStr, CloseBrktPos - 1), OpenBrktPos + 1) End Sub But =r[4]c means that it's 4 rows down from the cell containing that formula (in the same column). Goofy wrote: I need to get the integer value from the address R[4]C, any ideas ? -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get row number from R[4]C
myStr = "R[433]C"
was really myStr = "R[4]C" On my first test. Dave Peterson wrote: I'm not quite sure how you got this string, but this worked ok for me: Option Explicit Sub testme() Dim myStr As String Dim OpenBrktPos As Long Dim CloseBrktPos As Long myStr = "R[433]C" OpenBrktPos = InStr(1, myStr, "[", vbTextCompare) CloseBrktPos = InStr(1, myStr, "]", vbTextCompare) Debug.Print Mid(Left(myStr, CloseBrktPos - 1), OpenBrktPos + 1) End Sub But =r[4]c means that it's 4 rows down from the cell containing that formula (in the same column). Goofy wrote: I need to get the integer value from the address R[4]C, any ideas ? -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
excel format cells/Number/Category: Number problem | Excel Discussion (Misc queries) | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |