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: 553
Default RE-Post Max Function not working properly on 2D Array

I have a 2D array which I set up as a 2 columns and X Rows. I transpose it
to be X Rows by 2 Columns. I then test the max of the array and get an odd
result. The code is quite extensive but here is the just.

I set a break point and I print the transposed array contents to the
Immediate window in the first loop I get the following using the code below:
For X = 0 To UBound(NumberSetArray, 1)
Debug.Print NumberSetArray(X, 0) & ","; NumberSetArray(X, 1)
Next

I get the following in the Immediate Window:
7, 49

Immediately after printing tot the Immediate Window, I test for a max value
in the Immediate window using:
?Application.WorksheetFunction.Max(Application.Ind ex(NumberSetArray, , 1))
I get a value of 0.

Shouldn't the result be 7?

Whe I do the same test on the second column of the array I get:
?Application.WorksheetFunction.Max(Application.Ind ex(NumberSetArray, , 2))
52

Which I know to be correct.

Have I set the Index up incorrectly when attempting to apply the min
function to the first column

Thanks

EM
 
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
The F2 function key is not working properly. How do I correct Linda 440 Excel Discussion (Misc queries) 1 May 13th 10 07:26 AM
IF FUNCTION NOT WORKING PROPERLY YESHWANT Excel Discussion (Misc queries) 3 September 15th 09 07:28 PM
my sum function is not working properly rajnish Excel Discussion (Misc queries) 2 October 24th 07 02:29 PM
Why isn't my paste function working properly in Excel? trainer07 Excel Discussion (Misc queries) 2 October 19th 07 06:09 PM
Hyperlink function not working properly NB Excel Worksheet Functions 0 January 12th 07 06:18 PM


All times are GMT +1. The time now is 09:52 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"