View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default First Positive on Horizontal Array

Your formula returns 4 instead of 2

=INDEX(1:1,MATCH(TRUE,1:10,0))


ex. a1=4 (text value), b1=2, c1=5, d1=1, e1=0, f1=2



"Dave Peterson" wrote:

One way:

=INDEX(1:1,MATCH(TRUE,1:10,0))
or
=INDEX(a1:x1,MATCH(TRUE,a1:x10,0))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

VCUE wrote:

Is there a function that results/looks for the first single positive (non
zero) value in a Horizontal Array?
For example:
A B C D E F
Row 1: 0 2 5 1 0 2
Return the value that will be the first positive in the array, which will be
"2".


--

Dave Peterson