View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Find a value, return the value of another cell

You could also use a formula:

=INDEX($BA$1:$BL$1,MATCH(TRUE,$BA2:$BL20,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.)

or just in case:

=IF(COUNTIF($BA2:$BL2,""&0)=0,"No positive numbers",
INDEX($BA$1:$BL$1,MATCH(TRUE,$BA2:$BL20,0)))

(still an array formula)

Dave F wrote:

I need a formula for the following:

Given range BA2:BL2, I need to find the first value in this range 0,
reading left to right, and then return the text in the corresponding cell in
the range BA1:BL1.

Example, if the first value 0 in the range BA2:BL2 is in BD2, I need the
text in BD1 returned.

Clear?

I hope so.

Thanks.

Dave
--
Brevity is the soul of wit.


--

Dave Peterson