Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Find first positive value in a column

I am trying to create a formula that will:
1. Search a column of numbers to find the first row with a positive number
2. Once found, I need to reference another column on the same row which
contains a date.
3. Finally, subtract that date from a fixed date (Jan 1, 2007) to end up
with a number.

I'm fairly new to Excel and wonder if this can be done with a formula or if
I need to get into VB script (hope not) .
Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Find first positive value in a column

Try this array formula** :

A1 = 1/1/2007

B5:B20 = numbers
D5:D20 = dates

=A1-INDEX(D5:D20,MATCH(TRUE,A5:A200,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I am trying to create a formula that will:
1. Search a column of numbers to find the first row with a positive number
2. Once found, I need to reference another column on the same row which
contains a date.
3. Finally, subtract that date from a fixed date (Jan 1, 2007) to end up
with a number.

I'm fairly new to Excel and wonder if this can be done with a formula or
if
I need to get into VB script (hope not) .
Any help would be appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default Find first positive value in a column

You mean:
=A1-INDEX(D5:D20,MATCH(TRUE,B5:B200,0))
(not A5:A20)
Bob Umlas

"T. Valko" wrote in message
...
Try this array formula** :

A1 = 1/1/2007

B5:B20 = numbers
D5:D20 = dates

=A1-INDEX(D5:D20,MATCH(TRUE,A5:A200,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I am trying to create a formula that will:
1. Search a column of numbers to find the first row with a positive
number
2. Once found, I need to reference another column on the same row which
contains a date.
3. Finally, subtract that date from a fixed date (Jan 1, 2007) to end up
with a number.

I'm fairly new to Excel and wonder if this can be done with a formula or
if
I need to get into VB script (hope not) .
Any help would be appreciated.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Find first positive value in a column

Thanks for straightening that out!

--
Biff
Microsoft Excel MVP


"Bob Umlas" wrote in message
...
You mean:
=A1-INDEX(D5:D20,MATCH(TRUE,B5:B200,0))
(not A5:A20)
Bob Umlas

"T. Valko" wrote in message
...
Try this array formula** :

A1 = 1/1/2007

B5:B20 = numbers
D5:D20 = dates

=A1-INDEX(D5:D20,MATCH(TRUE,A5:A200,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I am trying to create a formula that will:
1. Search a column of numbers to find the first row with a positive
number
2. Once found, I need to reference another column on the same row which
contains a date.
3. Finally, subtract that date from a fixed date (Jan 1, 2007) to end up
with a number.

I'm fairly new to Excel and wonder if this can be done with a formula or
if
I need to get into VB script (hope not) .
Any help would be appreciated.






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Find first positive value in a column

That worked perfectly. Thanks very much!

"T. Valko" wrote:

Thanks for straightening that out!

--
Biff
Microsoft Excel MVP


"Bob Umlas" wrote in message
...
You mean:
=A1-INDEX(D5:D20,MATCH(TRUE,B5:B200,0))
(not A5:A20)
Bob Umlas

"T. Valko" wrote in message
...
Try this array formula** :

A1 = 1/1/2007

B5:B20 = numbers
D5:D20 = dates

=A1-INDEX(D5:D20,MATCH(TRUE,A5:A200,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I am trying to create a formula that will:
1. Search a column of numbers to find the first row with a positive
number
2. Once found, I need to reference another column on the same row which
contains a date.
3. Finally, subtract that date from a fixed date (Jan 1, 2007) to end up
with a number.

I'm fairly new to Excel and wonder if this can be done with a formula or
if
I need to get into VB script (hope not) .
Any help would be appreciated.








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Find first positive value in a column

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
That worked perfectly. Thanks very much!

"T. Valko" wrote:

Thanks for straightening that out!

--
Biff
Microsoft Excel MVP


"Bob Umlas" wrote in message
...
You mean:
=A1-INDEX(D5:D20,MATCH(TRUE,B5:B200,0))
(not A5:A20)
Bob Umlas

"T. Valko" wrote in message
...
Try this array formula** :

A1 = 1/1/2007

B5:B20 = numbers
D5:D20 = dates

=A1-INDEX(D5:D20,MATCH(TRUE,A5:A200,0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"George" wrote in message
...
I am trying to create a formula that will:
1. Search a column of numbers to find the first row with a positive
number
2. Once found, I need to reference another column on the same row
which
contains a date.
3. Finally, subtract that date from a fixed date (Jan 1, 2007) to end
up
with a number.

I'm fairly new to Excel and wonder if this can be done with a formula
or
if
I need to get into VB script (hope not) .
Any help would be appreciated.








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 sum only positive values in a column? zzapper Excel Discussion (Misc queries) 7 December 19th 06 10:46 PM
FIND POSITIVE VALUE FIRSTROUNDKO via OfficeKB.com Excel Discussion (Misc queries) 2 March 23rd 06 01:43 AM
Find first positive value in row 3 and return date from row 1 rlaw68 Excel Worksheet Functions 3 July 24th 05 04:26 PM
Find Median of Positive numbers only in Range MichaelC Excel Worksheet Functions 4 June 24th 05 03:06 AM
add only positive numbers and avg in a column rich Excel Worksheet Functions 6 March 10th 05 09:19 AM


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