Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Harold Good
 
Posts: n/a
Default lookup a value "greater than" 0

How would I do a lookup in a row with 4 values:
0 4.8 3.2 0
to find the first value that is greater than 0? The answer should be 4.8 but
what would the formula look like?

Thanks,

Harold


  #2   Report Post  
bpeltzer
 
Posts: n/a
Default lookup a value "greater than" 0

I hope someone can suggest something cleaner, but I think this will work...
If your values are in row 1:
=IF(A10,A1,INDEX(1:1,1+MATCH(0.0000000001,1:1,1)) )


"Harold Good" wrote:

How would I do a lookup in a row with 4 values:
0 4.8 3.2 0
to find the first value that is greater than 0? The answer should be 4.8 but
what would the formula look like?

Thanks,

Harold



  #3   Report Post  
Harold Good
 
Posts: n/a
Default lookup a value "greater than" 0

Thanks for your help bpelzter. Biff did suggest this one, both yours and his
work well.

Thanks for your help.

Harold
============
Try this:

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=INDEX(A4:D4,MATCH(TRUE,A4:D40,0))

A little more robust:

=INDEX(A4:D4,MATCH(1,(ISNUMBER(A4:D4))*(A4:D40),0 ))

Biff
=======================
"bpeltzer" wrote in message
...
I hope someone can suggest something cleaner, but I think this will work...
If your values are in row 1:
=IF(A10,A1,INDEX(1:1,1+MATCH(0.0000000001,1:1,1)) )


"Harold Good" wrote:

How would I do a lookup in a row with 4 values:
0 4.8 3.2 0
to find the first value that is greater than 0? The answer should be 4.8
but
what would the formula look like?

Thanks,

Harold





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
Another way to lookup data David Vollmer Excel Worksheet Functions 1 September 23rd 05 05:16 AM
lookup more than one cell andrewm Excel Worksheet Functions 20 June 14th 05 05:33 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 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 06:47 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"