Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bas Bas is offline
external usenet poster
 
Posts: 3
Default Problem with rank function based on a non-worksheet array

Hi all,

It seems impossible to calculate a ranking, based on a non-worksheet
array.
Please check my remark: "This won't work..."

Thanks in advance for any feedback!

- Bas

Here's my code;


Option Explicit

'General variables
Dim co As Byte 'Cut Off
Dim Inputs As Range
Dim UP As Variant
'Etcetera...


Function CR_4_SOMSC_GMDH(Inputs, co) As Variant

Dim CaseRankings As Variant '(97)
Dim BenchMarkRankings As Variant '(97)
UP = WorksheetFunction.Index(Inputs, 0, 1)
'Etcetera...

'Used as temporary Array
CaseRankings = Array(UP, UC, LOS, LCBP, LCAP, LCVP, LCOIP, LCB, LCA,
LCV, LCOI, LPBP, LPAP, LPVP, LPOIP, LPB, LPA, LPV, LPOI, OS, CBP, CAP,
CVP, COIP, CB, CA, CV, COI, PBP, PAP, PVP, POIP, PB, PA, PV_, POI,
HOS, HCBP, HCAP, HCVP, HCOIP, HCB, HCA, HCV, HCOI, HPBP, HPAP, HPVP,
HPOIP, HPB, HPA, HPV, HPOI, HV2, HV5, HV10, IV, VD, PD, A2, B2, B3,
B4, C1, D, E, E7, E8, E9, G, H, J, J1, J4, J5, J6, K, K4, K5, L1, M3,
M4, M5, m6, M7, M8, O, P2, P6, R, R5, R6, R7, S7, T8, V, Y)

UP = WorksheetFunction.Rank (UP, CaseRankings) 'This won't work, but
why? It won't give a error message, but the code quits here while
debugging.

'Etcetera...

'Rest of code

End Function

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
Worksheet Rank / Lookup function Gary T Excel Worksheet Functions 4 October 26th 07 07:14 PM
include criteria to 'rank based array function' TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 September 2nd 06 01:15 PM
rank based array function TUNGANA KURMA RAJU Excel Discussion (Misc queries) 16 September 2nd 06 02:56 AM
Rank items, select one start date, have remaining dates follow based on rank rob normerica Excel Discussion (Misc queries) 1 August 15th 05 09:36 PM
Can I count in an array based on a function? HokieLawrence Excel Worksheet Functions 2 February 12th 05 03:05 AM


All times are GMT +1. The time now is 10:26 AM.

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

About Us

"It's about Microsoft Excel"