View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_865_] Rick Rothstein \(MVP - VB\)[_865_] is offline
external usenet poster
 
Posts: 1
Default First Positive on Horizontal Array

I think this array-entered** formula will do what you asked...

=INDEX(A1:F1,1,MIN(IF(A1:F1=0,99999,COLUMN(A1:F1)) ))

** Commit this formula using Ctrl+Shift+Enter (not just Enter).

Rick


"VCUE" wrote in message
...
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".