Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Strange offset fault

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Strange offset fault

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Strange offset fault

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel display Fault Gilbert Bani Excel Discussion (Misc queries) 5 December 8th 09 08:30 PM
Fault macro security warning Razlapi Excel Discussion (Misc queries) 2 February 8th 08 12:42 PM
Fault 40aa979f LarryP Setting up and Configuration of Excel 0 December 20th 05 04:56 PM
fault message minostrada Excel Discussion (Misc queries) 1 September 14th 05 02:17 PM
Segmentation Fault?? chad Excel Discussion (Misc queries) 0 February 24th 05 04:19 PM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"