Variable in arguments

M

Mario

Hi there,

I would like to know how to add variable to arguments. E.g.: If I want to
write the formula =min(A10:B25), but instead of writing fixed cells, I would
like somthing like =min(A10:B"X+20"), where I can set any value to X. In this
case, if I set X=10, I would like to know the minimun between A20 and B30
(that is 10 + 20).

Thanks.
Mario
 
C

carlo

Hi there,

I would like to know how to add variable to arguments. E.g.: If I want to
write the formula =min(A10:B25), but instead of writing fixed cells, I would
like somthing like =min(A10:B"X+20"), where I can set any value to X. In this
case, if I set X=10, I would like to know the minimun between A20 and B30
(that is 10 + 20).

Thanks.
Mario

What you need is the indirect function:

=min(indirect("A10:B" & X+ 20)

hth

Carlo
 
D

Don Guillett

If you wanted to put your value in cell e1
=MIN(INDIRECT("A10:B"&E1))
or
=MIN(INDIRECT("A10:B"&E1+20))
 
Top