Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Finding the first value that is less than zero

I have a list of values in column b. I want to find the first time that this
value is less than zero. I then want to list the corresponding row in column
a. any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Finding the first value that is less than zero

Array-enter this expression in say C2,
ie confirm it by pressing CTRL+SHIFT+ENTER:
=INDEX(A2:A5,MATCH(MIN(IF(B2:B5<0,B2:B5)),IF(B2:B5 <0,B2:B5),0))
Adapt the ranges to suit your actual data extents in cols A and B

Success? Punch it here, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"russhess8" wrote:
I have a list of values in column b. I want to find the first time that this
value is less than zero. I then want to list the corresponding row in column
a. any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Finding the first value that is less than zero

Try the below.Please note that this is an array formula. Within the cell in
edit mode (F2) paste this formula and press Ctrl+Shift+Enter to apply this
formula. If successful in 'Formula Bar' you can notice the curly braces at
both ends like "{=<formula}"

=INDEX(A1:A100,MIN(IF(B1:B100<0,ROW(B1:B100))))

If this post helps click Yes
---------------
Jacob Skaria


"russhess8" wrote:

I have a list of values in column b. I want to find the first time that this
value is less than zero. I then want to list the corresponding row in column
a. any suggestions?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Finding the first value that is less than zero

Try this...

Assume your data is in the range B2:B20

Array entered** :

=MATCH(TRUE,B2:B20<0,0)+ROW(B2)-1

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"russhess8" wrote in message
...
I have a list of values in column b. I want to find the first time that
this
value is less than zero. I then want to list the corresponding row in
column
a. any suggestions?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Finding the first value that is less than zero

Hmmm...

I then want to list the corresponding row in column a.


I interpret that to mean you want the formula entered in some cell in column
A that returns the *row number* of the cell in column B that meets the
condition.

From reading the other replies I'm the only one that interprets it in this
way.

If you do want to return the corresponding value from column A where column
B is <0 then try this array formula** :

=INDEX(A2:A20,MATCH(TRUE,B2:B20<0,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this...

Assume your data is in the range B2:B20

Array entered** :

=MATCH(TRUE,B2:B20<0,0)+ROW(B2)-1

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT key then hit ENTER.

--
Biff
Microsoft Excel MVP


"russhess8" wrote in message
...
I have a list of values in column b. I want to find the first time that
this
value is less than zero. I then want to list the corresponding row in
column
a. any suggestions?





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
Finding the value of x bpiepkorn Excel Worksheet Functions 4 July 26th 07 04:02 PM
Finding The MAX Value carl Excel Worksheet Functions 6 July 25th 07 09:36 PM
Finding Max or Min Value [email protected] Excel Discussion (Misc queries) 4 November 24th 06 09:39 AM
Finding Row fak119 Excel Discussion (Misc queries) 3 May 18th 06 05:54 PM
finding value ceemo Excel Discussion (Misc queries) 4 April 20th 06 02:16 PM


All times are GMT +1. The time now is 02:00 AM.

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"