Ranges and Arrays in Excel VBA
OP did not state what other functions he expects to be using. My
question is why is it done in VBA, up to the RankAbsDiff stage.
I don't think your code will work as a Function, as you are assigning
values to a range, which Functions notably cannot do.
{=ABS(Set1-Set2)} returns an array of absolute differences.
Presuming that's in a range by itself, named AbsDiff,
{=RANK(AbsDiff,AbsDiff,1)} returns an array of ranks corresponding in
index. Or, use the non-array equivalent. Either takes about 3
minutes to calc for a 50,000-set of random doubles (x2).
On Oct 15, 5:19 pm, Alan Beban wrote:
ilia wrote:
It's difficult to test potential solutions without the actual AbsDiff
code you're using.
Second question, why aren't you doing this with built-in worksheet
functions?
What built-in worksheet functions are relevant besides the RANK function
that the Op is using?
Alan Beban
|