Variable range in MAX-function

N

nsv

I need to use the largest figure in a part of column D. The part is
defined with the lowest value of the range always being D2 and the
highest being determined by the number of used cells in column B, eg.
if column B contains 32 used cells then the range is (D2:D31)

I tried this formula:
=MAX(D2:ADDRESS(COUNT(B:B)-1;4;4))+1
but I cannot enter it. I get a message that it contains an error, just
as if I've forgotten a parenthesis or something like that.

I have tested the formula =ADDRESS(COUNT(B:B)-1;4;4) in spare cell in
the sheet where it works fine and writes D31 when there are 32 used
cells in column B.
Why doesn't it work in the MAX formual?

NSV
 
C

coa01gsb

Well the first thing I'd say is that the second part doesn't have
column reference:

=MAX(D2: 'need some reference to D here' ADDRESS(COUNT(B:B)-1;4;4))+1

Not quite sure how you do that though
 

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

Top