LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Strange Range.item behavior?

Can someone explain this to me?

From the immediate window:
?Range("A1").Item(3,1).address
$A$3
?Range("A1").Item(3).address
$A$3
?Range(Range("A1"), Range("G10")).Item(3,1).address
$A$3
?Range(Range("A1"), Range("G10")).Item(3).address
$C$1 <----!!!???

The last one there is where my confusion lies.

I'm sorting a range with the code below(rough example):
---------------------------------------------------------------------------------------------
Set rDataRng = Range(Range("A1"), Range("G10"))
With rDataRng
.Value = .Value
.Sort Key1:=.Item(2, 1), Order1:=xlDescending, OrderCustom:=1, _
Orientation:=xlLeftToRight
End With
---------------------------------------------------------------------------------------------

I initially had .Item(2) in there as the Key1 entry, which caused me to
stumble upon this (what I see as) strange behavior.
Is this a bug or one of those "by design" features?

Thanks for any input.
-Jeremy


 
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
Strange behavior Ritchie Excel Discussion (Misc queries) 2 September 26th 06 02:21 AM
Strange behavior DeRussie Setting up and Configuration of Excel 4 November 26th 05 05:41 PM
Strange behavior. Wiley Coyote Excel Discussion (Misc queries) 7 October 18th 05 04:35 PM
Strange PrintOut Behavior Bob Nonnemann Excel Programming 1 April 22nd 04 06:22 PM
Help with very strange cell behavior Terry von Gease Excel Programming 10 August 29th 03 04:21 PM


All times are GMT +1. The time now is 01:52 AM.

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"