SUM function with row not known

  • Thread starter Thread starter Lokutus
  • Start date Start date
L

Lokutus

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
 
=SUM(H:H)

or

=SUM(OFFSET(H1,,,COUNTA(H:H),1)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Back
Top