P
Paul
I have the following formula that looks for the second highest number
in column
M, and displays the corresponding TEXT in column B:
=INDEX(B$17:B$1936,MATCH(LARGE(M$17:M$1936,2),M$17:M$1936,0),1)
Now I would like to replace the range where Excel looks with the
selection where data is. IE, instead of B17:B1936 I want B17:B136 if
the last cell that contains data is B136.
I have to say that if there is an entry in column B there will also be
an entry in column M. And like I said, B consists of text and M of
numbers.
Obviously I have to do something with the offset function. I tried the
following which still gives the correct result:
=INDEX($B17:$B2000,MATCH(LARGE(OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),2),OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),0),1)
This still contains B17:B2000 though. If I change that to the
following then I get no result:
=INDEX((OFFSET(EPC!$B$17,,,COUNTA(EPC!$B:$B))),MATCH(LARGE(OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),2),OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),0),1)
What am I doing wrong?
Is there an easier solution??
Thanks in advance for your help.
Paul
in column
M, and displays the corresponding TEXT in column B:
=INDEX(B$17:B$1936,MATCH(LARGE(M$17:M$1936,2),M$17:M$1936,0),1)
Now I would like to replace the range where Excel looks with the
selection where data is. IE, instead of B17:B1936 I want B17:B136 if
the last cell that contains data is B136.
I have to say that if there is an entry in column B there will also be
an entry in column M. And like I said, B consists of text and M of
numbers.
Obviously I have to do something with the offset function. I tried the
following which still gives the correct result:
=INDEX($B17:$B2000,MATCH(LARGE(OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),2),OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),0),1)
This still contains B17:B2000 though. If I change that to the
following then I get no result:
=INDEX((OFFSET(EPC!$B$17,,,COUNTA(EPC!$B:$B))),MATCH(LARGE(OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),2),OFFSET(EPC!$M$17,,,COUNTA(EPC!$M:$M)),0),1)
What am I doing wrong?
Is there an easier solution??
Thanks in advance for your help.
Paul