Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hallo, programmers
I have the following code: Dim rng As String Dim i As Integer rng = "$A$1" For i = 0 To 3 Debug.Print rng & " / " & Range(rng).offset(i, 1).Address Next i It produces the following results: $A$1 / $C$1 $A$1 / $C$4 $A$1 / $C$5 $A$1 / $C$6 If you ask me it should produced the results $A$1 / $B$1 $A$1 / $B$2 $A$1 / $B$3 $A$1 / $B$4 Can anybody tell me I am doing wrong. Thanks in advance. Ramcsir |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just tried your code and it produced the results you expected
$A$1 / $B$1 $A$1 / $B$2 $A$1 / $B$3 $A$1 / $B$4 maybe there is something else going on "ramcsir" wrote: Hallo, programmers I have the following code: Dim rng As String Dim i As Integer rng = "$A$1" For i = 0 To 3 Debug.Print rng & " / " & Range(rng).offset(i, 1).Address Next i It produces the following results: $A$1 / $C$1 $A$1 / $C$4 $A$1 / $C$5 $A$1 / $C$6 If you ask me it should produced the results $A$1 / $B$1 $A$1 / $B$2 $A$1 / $B$3 $A$1 / $B$4 Can anybody tell me I am doing wrong. Thanks in advance. Ramcsir |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried it and got the correct results also.
-- HTH RP (remove nothere from the email address if mailing direct) "Gixxer_J_97" wrote in message ... I just tried your code and it produced the results you expected $A$1 / $B$1 $A$1 / $B$2 $A$1 / $B$3 $A$1 / $B$4 maybe there is something else going on "ramcsir" wrote: Hallo, programmers I have the following code: Dim rng As String Dim i As Integer rng = "$A$1" For i = 0 To 3 Debug.Print rng & " / " & Range(rng).offset(i, 1).Address Next i It produces the following results: $A$1 / $C$1 $A$1 / $C$4 $A$1 / $C$5 $A$1 / $C$6 If you ask me it should produced the results $A$1 / $B$1 $A$1 / $B$2 $A$1 / $B$3 $A$1 / $B$4 Can anybody tell me I am doing wrong. Thanks in advance. Ramcsir |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel display Fault | Excel Discussion (Misc queries) | |||
Fault macro security warning | Excel Discussion (Misc queries) | |||
Fault 40aa979f | Setting up and Configuration of Excel | |||
fault message | Excel Discussion (Misc queries) | |||
Segmentation Fault?? | Excel Discussion (Misc queries) |