ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finction to find the first cell that is not zero (https://www.excelbanter.com/excel-worksheet-functions/145868-finction-find-first-cell-not-zero.html)

Mark[_3_]

Finction to find the first cell that is not zero
 
Hi

I want to find the first cell that is not zero "0" across a row. I am also
trying a VBA solution, but is ther percahnce a function that will do this?

Mark




Ron Rosenfeld

Finction to find the first cell that is not zero
 
On Sat, 9 Jun 2007 06:08:46 +1000, "Mark" wrote:

Hi

I want to find the first cell that is not zero "0" across a row. I am also
trying a VBA solution, but is ther percahnce a function that will do this?

Mark



What do you mean by "find" the first cell?

This **array-entered** formula will return the column number of the first cell
in row 1 with a non-zero entry (enter with <ctrl-shift-enter)

=MATCH(1,ISNUMBER(1:1)*(1:1<0),0)

This **array-entered** formula will return the value in that cell:


=INDIRECT(ADDRESS(1,MATCH(1,ISNUMBER(1:1)*(1:1<0) ,0)))



--ron

Stan Brown

Finction to find the first cell that is not zero
 
Sat, 9 Jun 2007 06:08:46 +1000 from Mark
:

I want to find the first cell that is not zero "0" across a row. I am also
trying a VBA solution, but is ther percahnce a function that will do this?


Please don't post the same query multiple times.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/

Mark[_4_]

Finction to find the first cell that is not zero
 
Hi Ron

Thanks for this, it has solved another issue that I have just stumbled
across with my data.

Cheers...

"Ron Rosenfeld" wrote in message
...
On Sat, 9 Jun 2007 06:08:46 +1000, "Mark"
wrote:

Hi

I want to find the first cell that is not zero "0" across a row. I am also
trying a VBA solution, but is ther percahnce a function that will do this?

Mark



What do you mean by "find" the first cell?

This **array-entered** formula will return the column number of the first
cell
in row 1 with a non-zero entry (enter with <ctrl-shift-enter)

=MATCH(1,ISNUMBER(1:1)*(1:1<0),0)

This **array-entered** formula will return the value in that cell:


=INDIRECT(ADDRESS(1,MATCH(1,ISNUMBER(1:1)*(1:1<0) ,0)))



--ron




Ron Rosenfeld

Finction to find the first cell that is not zero
 
On Tue, 12 Jun 2007 10:58:14 +1000, "Mark"
wrote:

Hi Ron

Thanks for this, it has solved another issue that I have just stumbled
across with my data.

Cheers...


You're welcome. Glad to help.
--ron


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

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