need some help with an array function

L

Lorin

I want to replace a calculated column (Dif in example below), with an
array. I want to create the fourth column (Ranking) without having the
third column (Dif).

EXAMPLE:
A B Dif Ranking
12 11 1 1
34 22 12 4
16 12 4 2
18 13 5 3

Dif is A2-B2 for row 2, A3-B3 for row 3, etc.

My plan was to use =rank(A2-B2,A2:A5-B2:B5,0) and hit Ctrl+Shift+Enter
to tell it that A2:A5-B2:B5 is an array, but it isn't working. (Excel
won't let me enter that formula at all.) =rank(A2-B2,C2:C5,0) works as
expected. Obviously, I could calculate column C and hide it but this is
not what I want to do.

Can somebody help? This is a simpler problem then the one I recently
posted, but I think related (and makes me think the other is not
related to ISNA after all).
 
R

Ron Rosenfeld

I want to replace a calculated column (Dif in example below), with an
array. I want to create the fourth column (Ranking) without having the
third column (Dif).

EXAMPLE:
A B Dif Ranking
12 11 1 1
34 22 12 4
16 12 4 2
18 13 5 3

Dif is A2-B2 for row 2, A3-B3 for row 3, etc.

My plan was to use =rank(A2-B2,A2:A5-B2:B5,0) and hit Ctrl+Shift+Enter
to tell it that A2:A5-B2:B5 is an array, but it isn't working. (Excel
won't let me enter that formula at all.) =rank(A2-B2,C2:C5,0) works as
expected. Obviously, I could calculate column C and hide it but this is
not what I want to do.

Can somebody help? This is a simpler problem then the one I recently
posted, but I think related (and makes me think the other is not
related to ISNA after all).

You could try this array formula:

=MATCH(A2-B2,SMALL($A$2:$A$5-$B$2:$B$5,
ROW(INDIRECT("1:"&ROWS($A$2:$A$5)))),0)


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Alpha sorting (with a twist...?) 3
Numerating Cells. 2
Summarizing data 2
date range 11
Sum Array Range & Individual Cells 1
repost: conditional sum? 5
Average problem 1
Need help with an excel formula 1

Top