ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Dynamic formula (https://www.excelbanter.com/excel-worksheet-functions/95164-dynamic-formula.html)

[email protected]

Dynamic formula
 
Lets say I have some numbers in the range A1:A10 and I have to take a
sum of it in cell B1, I will use the formula =SUM(A1:A10).

My question is, is it possible to detect the last row of the range and
have a dynamic formula?

For instance, the formula should be able to detect A10 (the second
parameter) automatically.

something like =SUM(A1:&count(A:A)) &count(A:A) count will give the
value 10

Sandy


Bob Phillips

Dynamic formula
 
Why not just use

=SUM(A:A)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Lets say I have some numbers in the range A1:A10 and I have to take a
sum of it in cell B1, I will use the formula =SUM(A1:A10).

My question is, is it possible to detect the last row of the range and
have a dynamic formula?

For instance, the formula should be able to detect A10 (the second
parameter) automatically.

something like =SUM(A1:&count(A:A)) &count(A:A) count will give the
value 10

Sandy




[email protected]

Dynamic formula
 
providing you don't have blanks then

=SUM(a1:OFFSET(a1,COUNTA(a:a)-1,0))

will give you the dynamic you want - but as Bob says, why not just use
the entire column?!

Bob Phillips wrote:
Why not just use

=SUM(A:A)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Lets say I have some numbers in the range A1:A10 and I have to take a
sum of it in cell B1, I will use the formula =SUM(A1:A10).

My question is, is it possible to detect the last row of the range and
have a dynamic formula?

For instance, the formula should be able to detect A10 (the second
parameter) automatically.

something like =SUM(A1:&count(A:A)) &count(A:A) count will give the
value 10

Sandy



[email protected]

Dynamic formula
 
Thank you both of you for your answers. I really appreciate



All times are GMT +1. The time now is 07:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com