L
Leo Heuser
Harlan Grove said:No, it should return {2,65537;3,65538;4,65539;...;65536,131071}.
Thanks!
If you misunderstand how my expression works, don't be surprised that you
fail to anticipate what it returns.
I didn't misunderstand. I *asked* if I had understood it properly, expecting
that it would return the missing numbers (which was, what the OP wanted),
and you gave me a straight answer.
Why add these poisoneous remarks?
...
Um, the normal way, but it's not supposed to be directly entered in a
worksheet. It's meant to be fed to SMALL. Note: you can select
R1C1:R65535C50 and enter the array formula
=ROW(INDIRECT("1:65535"))+65535*(COLUMN(INDIRECT("A:AX"))-1)
and it'll populate the range with sequential integers from 1 to 50*65535.
Can you not do this in Excel on your PC?
OK, you're right. COUNTIF doesn't work with arrays. If the array in question
(smallarray) is sorted, however,
LOOKUP(bigarray,smallarray)=bigarray
is more efficient than ISNA(MATCH(bigarray,smallarray,0)).
Well, it's an assumption, but the OP's array did appear sorted, and some
data processing experience would show that finding gaps in sequences is much
easier when the list is sorted. So for this sort of application, assuming
the list is sorted is a hint that the list should be sorted.
As for VLOOKUP and HLOOKUP, given the following table in A1:B20
A 3
D 5
E 53
G 77
G 87
H 15
L 12
L 12
L 62
M 36
O 58
O 75
P 83
R 31
S 41
T 57
U 4
V 35
Y 64
Z 15
the formula
=VLOOKUP({"A","E","I","O","U"},A1:B20,2)
if entered into a 5 column by 1 row range returns
3 53 15 75 4
And similarly for HLOOKUP. It's not that these functions can't take array
1st arguments, the problem is that they don't return arrays when fed such
1st arguments. They return something akin to what INDEX returns when fed
array 2nd or 3rd arguments.
That's what I meant.
I was talking about single-cell not multi-cells formulae.
LOOKUP can return an array, HLOOKUP and VLOOKUP can't.
LeoH