close

I want to use the address function to indicate the range in the
calculation of a slope:

cell A2 contains the value 20

=ADDRESS(A2,2) returns $B$20
=ADDRESS(A2,3) returns $C$20

Cell B20 and C20 are the starting cells for calculating the slope:
=slope(B20:B25,C20:C25)

But putting the address function in the slope calculation, like
=slope(ADDRESS(A2,2):B25,ADDRESS(A2,3):C25) does not work!

Why can't I combine these functions?
Is there another (simple) way?Mayo --
Mayo
------------------------------------------------------------------------
Mayo's Profile: www.excelforum.com/member.php...oamp;userid=26371
View this thread: www.excelforum.com/showthread...hreadid=508986=slope(Indirect(quot;Bquot;amp;A2amp;quot;:B25quot;),Indirect(quot;Cquot;amp;A2amp;quot;:C 25quot;))

--
Regards,
Tom Ogilvy

quot;Mayoquot; gt; wrote in message
...
gt;
gt; I want to use the address function to indicate the range in the
gt; calculation of a slope:
gt;
gt; cell A2 contains the value 20
gt;
gt; =ADDRESS(A2,2) returns $B$20
gt; =ADDRESS(A2,3) returns $C$20
gt;
gt; Cell B20 and C20 are the starting cells for calculating the slope:
gt; =slope(B20:B25,C20:C25)
gt;
gt; But putting the address function in the slope calculation, like
gt; =slope(ADDRESS(A2,2):B25,ADDRESS(A2,3):C25) does not work!
gt;
gt; Why can't I combine these functions?
gt; Is there another (simple) way?
gt;
gt;
gt; Mayo
gt;
gt;
gt; --
gt; Mayo
gt; ------------------------------------------------------------------------
gt; Mayo's Profile:
www.excelforum.com/member.php...oamp;userid=26371
gt; View this thread: www.excelforum.com/showthread...hreadid=508986
gt;

Thanx to my boyfriend I found the solution myself

The indirect function should be used, it converts text to a cell or
range reference

My example would become:
=slope(indirect(quot;Bquot; amp; A2 amp; quot;:B25quot;),indirect(quot;Cquot; amp; A2 amp; quot;:C25quot;))--
Mayo
------------------------------------------------------------------------
Mayo's Profile: www.excelforum.com/member.php...oamp;userid=26371
View this thread: www.excelforum.com/showthread...hreadid=508986Try

=SLOPE(INDIRECT(quot;Bquot;amp;A2amp;quot;:B25quot;),INDIRECT(quot;Cquot;amp;A2amp;quot;:C 25quot;))

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()