ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Return latest value from data range (https://www.excelbanter.com/excel-discussion-misc-queries/232576-return-latest-value-data-range.html)

WildWill

Return latest value from data range
 
I have A1:A5 which typically fill with data in a sequential manner, i.e.
first A1 would contain a value, then A1 & A2 would contain values, then A1,
A2 & A3 would contain values, etc, etc. I want to look into this range of
cells (A1:A5) and always retrun the "latest" value to cell C1.

E.g. If A1 & A2 have values in them and A3:A5 are empty, then the value of
A2 will be returned to C1. If A1, A2 & A3 have values in them then A3's while
A4 & A5 are empty, then A3's value will be placed in C1, etc, etc.

Thanks!

David Biddulph[_2_]

Return latest value from data range
 
=IF(A5<"",A5,IF(A4<"",A4,IF(A3<"",A3,IF(A2<"", A2,IF(A1<"",A1,"")))))
--
David Biddulph

"WildWill" wrote in message
...
I have A1:A5 which typically fill with data in a sequential manner, i.e.
first A1 would contain a value, then A1 & A2 would contain values, then
A1,
A2 & A3 would contain values, etc, etc. I want to look into this range of
cells (A1:A5) and always retrun the "latest" value to cell C1.

E.g. If A1 & A2 have values in them and A3:A5 are empty, then the value of
A2 will be returned to C1. If A1, A2 & A3 have values in them then A3's
while
A4 & A5 are empty, then A3's value will be placed in C1, etc, etc.

Thanks!




Mike H

Return latest value from data range
 
try

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

Mike

"WildWill" wrote:

I have A1:A5 which typically fill with data in a sequential manner, i.e.
first A1 would contain a value, then A1 & A2 would contain values, then A1,
A2 & A3 would contain values, etc, etc. I want to look into this range of
cells (A1:A5) and always retrun the "latest" value to cell C1.

E.g. If A1 & A2 have values in them and A3:A5 are empty, then the value of
A2 will be returned to C1. If A1, A2 & A3 have values in them then A3's while
A4 & A5 are empty, then A3's value will be placed in C1, etc, etc.

Thanks!


Jarek Kujawa[_2_]

Return latest value from data range
 
numbers:
=OFFSET(A1,MAX(IF(ISNUMBER(A1:A5),ROW(A1:A5)))-1,)

strings:
=OFFSET(A1,MAX(IF(LEN(A1:A5),ROW(A1:A5)))-1,)

both formulae array-entered i.e. with CTRL+SHIFT+ENTER



On 2 Cze, 12:22, WildWill wrote:
I have A1:A5 which typically fill with data in a sequential manner, i.e.
first A1 would contain a value, then A1 & A2 would contain values, then A1,
A2 & A3 would contain values, etc, etc. I want to look into this range of
cells (A1:A5) and always retrun the "latest" value to cell C1.

E.g. If A1 & A2 have values in them and A3:A5 are empty, then the value of
A2 will be returned to C1. If A1, A2 & A3 have values in them then A3's while
A4 & A5 are empty, then A3's value will be placed in C1, etc, etc.

Thanks!



WildWill

Return latest value from data range
 
Thanks All!

"WildWill" wrote:

I have A1:A5 which typically fill with data in a sequential manner, i.e.
first A1 would contain a value, then A1 & A2 would contain values, then A1,
A2 & A3 would contain values, etc, etc. I want to look into this range of
cells (A1:A5) and always retrun the "latest" value to cell C1.

E.g. If A1 & A2 have values in them and A3:A5 are empty, then the value of
A2 will be returned to C1. If A1, A2 & A3 have values in them then A3's while
A4 & A5 are empty, then A3's value will be placed in C1, etc, etc.

Thanks!



All times are GMT +1. The time now is 08:41 PM.

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