Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 30
Default Retrieve last non zero value in a range of cells

Hi

How do I extract the last non zero value in a range of 5 Cells for
Example:


A1=95
B1=93
C1=98
D1=0
E1=0

From the example above I would require to choose the value 98 from the
Range declared. Some weeks it is possible for all the values to be 0
so therefore I would need the Value in E1 other weeks it may be B1

Would it be possible to return the value I require into Cell G1 in
the example above?

Thanks

Peter
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 621
Default Retrieve last non zero value in a range of cells

Entered in G1

=LOOKUP(2,1/(A1:E1<0),A1:E1)


Gord Dibben MS Excel MVP

On Wed, 8 Jun 2011 11:55:19 -0700 (PDT), Pete wrote:

Hi

How do I extract the last non zero value in a range of 5 Cells for
Example:


A1=95
B1=93
C1=98
D1=0
E1=0

From the example above I would require to choose the value 98 from the
Range declared. Some weeks it is possible for all the values to be 0
so therefore I would need the Value in E1 other weeks it may be B1

Would it be possible to return the value I require into Cell G1 in
the example above?

Thanks

Peter

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 30
Default Retrieve last non zero value in a range of cells

On Jun 8, 8:12*pm, Gord Dibben wrote:
Entered in G1

=LOOKUP(2,1/(A1:E1<0),A1:E1)

Gord Dibben * * MS Excel MVP



On Wed, 8 Jun 2011 11:55:19 -0700 (PDT), Pete wrote:
Hi


How do I extract the last non zero value in a range of 5 Cells for
Example:


A1=95
B1=93
C1=98
D1=0
E1=0


From the example above I would require to choose the value 98 from the
Range declared. Some weeks it is possible for all the values to be 0
so therefore I would need the Value in E1 other weeks it may be B1


Would it be possible to *return the value I require into Cell G1 in
the example above?


Thanks


Peter- Hide quoted text -


- Show quoted text -


Brilliant, exactly what I was after. Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retrieve Named Range name? Guntars Excel Worksheet Functions 3 June 8th 09 03:06 AM
Need formula to retrieve last non-blank cell in range Eric Excel Discussion (Misc queries) 7 July 20th 06 01:29 PM
Retrieve text content from range with criteria DoctorG Excel Worksheet Functions 2 June 21st 06 11:31 PM
Retrieve value from a range of cells EMoe Excel Worksheet Functions 3 June 19th 06 07:02 PM
Formula to retrieve range of dates from a worksheet to calculate d accented Excel Worksheet Functions 0 January 10th 06 09:52 PM


All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"