ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finding non zero value in a group of cells (https://www.excelbanter.com/excel-worksheet-functions/189877-finding-non-zero-value-group-cells.html)

eric H

Finding non zero value in a group of cells
 
I have a monthly list of Selling Prices by part that I want to use a formula
on to retrieve the most recent price. The problem occurs when the last
month(s) in the list has no sales and thus no sellng price. See Below:

Sep Oct Nov Dec

Part A 4 4 4 3
Part B 2 2

I can't use 12 If Statements to say "If Dec is 0, use Nov, If Nov is 0 use
Oct, etc". What formula can I use that will go backwards (In this case Dec
backwards) until it finds a value?

Gary''s Student

Finding non zero value in a group of cells
 
=LOOKUP(2,1/(28:280),28:28) will give the last value in row #28, for example
--
Gary''s Student - gsnu200789


"Eric H" wrote:

I have a monthly list of Selling Prices by part that I want to use a formula
on to retrieve the most recent price. The problem occurs when the last
month(s) in the list has no sales and thus no sellng price. See Below:

Sep Oct Nov Dec

Part A 4 4 4 3
Part B 2 2

I can't use 12 If Statements to say "If Dec is 0, use Nov, If Nov is 0 use
Oct, etc". What formula can I use that will go backwards (In this case Dec
backwards) until it finds a value?


T. Valko

Finding non zero value in a group of cells
 
Assuming the cells are empty (as your sample portrays) and do not contain
numeric 0.

Try this:

=LOOKUP(1E100,B2:M2)

--
Biff
Microsoft Excel MVP


"Eric H" <Eric wrote in message
...
I have a monthly list of Selling Prices by part that I want to use a
formula
on to retrieve the most recent price. The problem occurs when the last
month(s) in the list has no sales and thus no sellng price. See Below:

Sep Oct Nov Dec

Part A 4 4 4 3
Part B 2 2

I can't use 12 If Statements to say "If Dec is 0, use Nov, If Nov is 0 use
Oct, etc". What formula can I use that will go backwards (In this case
Dec
backwards) until it finds a value?





All times are GMT +1. The time now is 01:54 AM.

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