Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DAVID
 
Posts: n/a
Default find first nonzero value in column

I have two columns A and B. Column A contains ascending numbers from 1 to
100, Column B arbitrary numbers. I am looking for a function that looks for
the first nonzero value in column B (going from the first to the last row)
and then returns the value from column A of the same row. Can somebody help
me?

Thanks,
David
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 10 Jan 2005 05:07:01 -0800, "DAVID"
wrote:

I have two columns A and B. Column A contains ascending numbers from 1 to
100, Column B arbitrary numbers. I am looking for a function that looks for
the first nonzero value in column B (going from the first to the last row)
and then returns the value from column A of the same row. Can somebody help
me?

Thanks,
David


In general, the array formula:

=INDEX(A1:A100,MATCH(TRUE,B1:B100<0,0))

will do that.

To enter an array-formula, hold down <ctrl<shift while hitting <enter. XL
will place braces {...} around the formula if you did it correctly.

However, given the specifics of your question, the simplified array formula:

=MATCH(TRUE,B1:B100<0,0)

should give the same result.


--ron
  #3   Report Post  
 
Posts: n/a
Default

Ron Rosenfeld wrote...
"DAVID" wrote...
I have two columns A and B. Column A contains ascending numbers from

1 to
100, Column B arbitrary numbers. I am looking for a function that

looks for
the first nonzero value in column B (going from the first to the last

row)
and then returns the value from column A of the same row. Can

somebody help
me?

....
However, given the specifics of your question, the simplified array

formula:

=MATCH(TRUE,B1:B100<0,0)

should give the same result.

Where did the OP state that the col A values were in A1:A100?

  #6   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=OFFSET(A1,MATCH(TRUE,ISNUMBER(B1:INDEX(B:B,MATCH( 9.99999999999999E+307,B:B))),0)-1,0,1,1)

whichmust be confirmed with control=shift+enter instead of just with enter.

If column A is populated with the sequence 1 to 100 from A1 on:

=MATCH(TRUE,ISNUMBER(B1:B100),0)

which must be confirmed with control+shift+enter (instead of the usual
enter), should suffice.

DAVID wrote:
I have two columns A and B. Column A contains ascending numbers from 1 to
100, Column B arbitrary numbers. I am looking for a function that looks for
the first nonzero value in column B (going from the first to the last row)
and then returns the value from column A of the same row. Can somebody help
me?

Thanks,
David

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
find rows for unique data in 1 column and different data in other. Dot Majewski Excel Discussion (Misc queries) 1 January 21st 05 12:23 AM
how do I find an average number of specific words in a column cashgrfx New Users to Excel 7 January 6th 05 04:44 PM
find LAST match in column Pantryman Excel Worksheet Functions 1 November 5th 04 04:05 PM
How do I find the first value in a column less than a number? redeucer Excel Worksheet Functions 6 November 4th 04 09:59 PM
Find AVG/MIN of a Column, excluding 0's and NULL's? JT Excel Worksheet Functions 3 November 4th 04 06:15 PM


All times are GMT +1. The time now is 06:36 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"