View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Apply names to relative references

Jim Russell wrote...
I have a formula that includes the expression "min(L2,M2)". I want
to be able to name columns L and M, and have those names used in
the expression. The row number is relative, so the formulas below are
"min(l3,M3)", etc. . . . How should I name the columns to be able to
apply them, and what should the formula look like when it is done?

....

If this isn't just a contrived, oversimplified example, so the two
columns in question really would be adjacent, the simplest, MOST
READABLE formula would be

=MIN($L2:$M2)

If you really, really have to use defined names, then in any cell in
the row in which you want the formula to reference L2:M2 define a name
like ColsLM referring to =$L2:$M2. Then use the formula

=MIN(ColsLM)

If you fill this formula down into the next row, in that row ColsLM
would refer to L3:M3 since ColLM is defined as column absolute but row
relative, so the row portion of the range reference changes as
formulas using the defined name are filled or copied into different
rows.

If you want two separate defined names, then in any cell in the row in
which uou want the formula to reference L2 and M2 define the names
ColL referring to =$L2 and ColM referring to =$M2. Then use the
formula

=MIN(ColL,ColM)