View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default find first value in a row with value greater than 0

Bob's and Peo's and Topper's solutions make me feel like a rookie (which I
probably am)

--
AP

"Ardus Petus" a écrit dans le message de
...
Both formulas are array formulas (to be validated with Crl-Shift-Enter)

Min:

=INDEX(Feuil1!$A1:$E1,,MIN(IF(Feuil1!$A2:$E20,COL UMN(Feuil1!$A2:$E2),99999)
))

Max:
=INDEX(Feuil1!$A1:$E1,,MAX(IF(Feuil1!$A2:$E20,COL UMN(Feuil1!$A2:$E2),0)))

See example: http://cjoint.com/?eltiyaAmhZ

HTH
--
AP

"C-A" a écrit dans le message de
...
I need to search rows in a worksheet for the first cell with a value

over
0
and return the corresponding column name to another worksheet. Then need

to
find the last cell with a value and return the corresponding column

name.

eg.
worksheet 1
Celery Carrots Yams Onions Radish
0 3 7 5 0

worksheet 2
A B
Carrots Onions

Is it possible? I tried lookup and hlookup, but returning #N/A.

You assistance is appreciated.

Thanks