Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DAVID
 
Posts: n/a
Default lookup nonzerovalues

I have two columns A and B. Column A contains ascending numbers from 1 to
100, column B contains arbitrary values (not in ascending order). What is the
function that looks for the first nonzero value in column B (going from the
frist to the last row) and returns the value of column A of the same row?
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi David

=INDEX($A$1:$B$1000,SMALL(IF($B$1:$B$1000<0,ROW($ B$1:$B$1000),""),1),1)

entered using control & shift & enter not just enter

Cheers
JulieD

"DAVID" wrote in message
...
I have two columns A and B. Column A contains ascending numbers from 1 to
100, column B contains arbitrary values (not in ascending order). What is
the
function that looks for the first nonzero value in column B (going from
the
frist to the last row) and returns the value of column A of the same row?



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Another one:

=INDEX($A$1:$A$1000,MATCH(TRUE,$B$1:$B$1000<0,0))
Still hit ctrl-shift-enter with this array formula.

Change that 1000 to be as big as you need, but you can't use the whole column.

DAVID wrote:

I have two columns A and B. Column A contains ascending numbers from 1 to
100, column B contains arbitrary values (not in ascending order). What is the
function that looks for the first nonzero value in column B (going from the
frist to the last row) and returns the value of column A of the same row?


--

Dave Peterson
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 create a lookup table with an added varable? GIZZMO Excel Worksheet Functions 3 April 6th 09 10:32 PM
Lookup Problem StephanieH Excel Worksheet Functions 1 December 20th 04 06:17 PM
Index table lookup anomaly Carole O Excel Worksheet Functions 9 December 9th 04 04:33 PM
Excel Lookup Functions Paul Adams Excel Worksheet Functions 1 November 10th 04 02:40 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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

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"