Hello,
I have a problem with SUM function in my sheet. The sheet is a template
that I use to export some data into it from external database. Then I
need to count some values. But in design time, I don't know, how many
rows it will be after exporting data. I need to prepare a cell with
SUM(H1:H...someRow) function. My export script will set a value of X1
cell to row count e.g. 52.
How can I use value in X1 as a last row for my SUM function.
SUM(H1:ADDRESS(X1;8)) doesn't work.
Any idea to solve it? Thanks in advance.
Lokutus--
Lokutus
------------------------------------------------------------------------
Lokutus's Profile: www.excelforum.com/member.php...oamp;userid=32270
View this thread: www.excelforum.com/showthread...hreadid=520226=SUM(H:H)
or
=SUM(OFFSET(H1,,,COUNTA(H:H),1)
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Lokutusquot; gt; wrote in
message ...
gt;
gt; Hello,
gt; I have a problem with SUM function in my sheet. The sheet is a template
gt; that I use to export some data into it from external database. Then I
gt; need to count some values. But in design time, I don't know, how many
gt; rows it will be after exporting data. I need to prepare a cell with
gt; SUM(H1:H...someRow) function. My export script will set a value of X1
gt; cell to row count e.g. 52.
gt; How can I use value in X1 as a last row for my SUM function.
gt;
gt; SUM(H1:ADDRESS(X1;8)) doesn't work.
gt;
gt; Any idea to solve it? Thanks in advance.
gt; Lokutus
gt;
gt;
gt; --
gt; Lokutus
gt; ------------------------------------------------------------------------
gt; Lokutus's Profile:
www.excelforum.com/member.php...oamp;userid=32270
gt; View this thread: www.excelforum.com/showthread...hreadid=520226
gt;
=SUM(H1:INDEX(H:H,X1))
Lokutus wrote:
gt; Hello,
gt; I have a problem with SUM function in my sheet. The sheet is a template
gt; that I use to export some data into it from external database. Then I
gt; need to count some values. But in design time, I don't know, how many
gt; rows it will be after exporting data. I need to prepare a cell with
gt; SUM(H1:H...someRow) function. My export script will set a value of X1
gt; cell to row count e.g. 52.
gt; How can I use value in X1 as a last row for my SUM function.
gt;
gt; SUM(H1:ADDRESS(X1;8)) doesn't work.
gt;
gt; Any idea to solve it? Thanks in advance.
gt; Lokutus
gt;
gt;
- Jun 22 Fri 2007 20:38
SUM function with row not known
close
全站熱搜
留言列表
發表留言