ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel (https://www.excelbanter.com/excel-worksheet-functions/126325-excel.html)

waltwlms

Excel
 
Is there a function that can pull the last no. of a varying range. ii.e., I
add a number to the range daily, and I want to pull the last no. entered for
a formula.

Dave F

Excel
 
Here is some VBA which will find the last value in a dynamic range:
http://www.ozgrid.com/VBA/ExcelRanges.htm

Dave
--
Brevity is the soul of wit.


"waltwlms" wrote:

Is there a function that can pull the last no. of a varying range. ii.e., I
add a number to the range daily, and I want to pull the last no. entered for
a formula.


Dave F

Excel
 
Actually if you don't want to use VBA here's a formula:
=OFFSET(B2,MAX(IF(NOT(ISBLANK(B2:B25)),ROW(B2:B25) ,0))-ROW(B2),0)

This is an array formula and needs to be entered with CTRL+SHIFT+ENTER in
order to calculate. Assumes the range in question is in B2:B25.

If the range in question grows and contracts in size dynamically you may
want to use dynamic named ranges in conjunction with the above. See here for
more info: http://www.ozgrid.com/Excel/DynamicRanges.htm

Dave
--
Brevity is the soul of wit.


"Dave F" wrote:

Here is some VBA which will find the last value in a dynamic range:
http://www.ozgrid.com/VBA/ExcelRanges.htm

Dave
--
Brevity is the soul of wit.


"waltwlms" wrote:

Is there a function that can pull the last no. of a varying range. ii.e., I
add a number to the range daily, and I want to pull the last no. entered for
a formula.


Domenic

Excel
 
Try...

=LOOKUP(9.99999999999999E+307,A2:A100)

or

=LOOKUP(9.99999999999999E+307,A:A)

Hope this helps!

In article ,
waltwlms wrote:

Is there a function that can pull the last no. of a varying range. ii.e., I
add a number to the range daily, and I want to pull the last no. entered for
a formula.


Teethless mama

Excel
 
=LOOKUP(2,1/(A1:A65535<""),A1:A65535)


"waltwlms" wrote:

Is there a function that can pull the last no. of a varying range. ii.e., I
add a number to the range daily, and I want to pull the last no. entered for
a formula.



All times are GMT +1. The time now is 01:13 PM.

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