Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default return last cell in a row not zero

hopefully simple but im an access type... and I would like a formula, not vb
code. a price is entered each week, starting from the left, default $0 if
not filled in. I want to return the first nonzero value from the right.
After 4 weeks i t looks like:

15 25 35 25 0 0 0 0 0

I want to return 25.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default return last cell in a row not zero

Check out this link...

http://www.xldynamic.com/source/xld.LastValue.html
--
HTH...

Jim Thomlinson


"Maarkr" wrote:

hopefully simple but im an access type... and I would like a formula, not vb
code. a price is entered each week, starting from the left, default $0 if
not filled in. I want to return the first nonzero value from the right.
After 4 weeks i t looks like:

15 25 35 25 0 0 0 0 0

I want to return 25.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default return last cell in a row not zero

a price is entered each week

I guess that means it's safe to assume there are no negative numbers?

Try this:

=IF(COUNTIF(A1:I1,"0"),LOOKUP(1E100,1/A1:I1,A1:I1),"no prices")

Will return the rightmost non-zero value.

--
Biff
Microsoft Excel MVP


"Maarkr" wrote in message
...
hopefully simple but im an access type... and I would like a formula, not
vb
code. a price is entered each week, starting from the left, default $0 if
not filled in. I want to return the first nonzero value from the right.
After 4 weeks i t looks like:

15 25 35 25 0 0 0 0 0

I want to return 25.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default return last cell in a row not zero

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


"Maarkr" wrote:

hopefully simple but im an access type... and I would like a formula, not vb
code. a price is entered each week, starting from the left, default $0 if
not filled in. I want to return the first nonzero value from the right.
After 4 weeks i t looks like:

15 25 35 25 0 0 0 0 0

I want to return 25.

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
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
Return cell adress for next non-blank cell in a range toreadore Excel Worksheet Functions 1 June 28th 06 12:37 PM
How do you make cell 2 return data if cell 1 contains text? jermsalerms Excel Discussion (Misc queries) 3 January 5th 06 10:44 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM
function CELL() to return the formula in the referenced cell Streep Excel Worksheet Functions 3 August 20th 05 10:24 PM


All times are GMT +1. The time now is 12:25 PM.

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

About Us

"It's about Microsoft Excel"