View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default This has me stumped

I assume you want the cell address?

Assuming that 1 does exist...

Range of interest is A2:E2

For the first cell address, array entered** :

=ADDRESS(ROW(A2:E2),MIN(IF(A2:E2=1,COLUMN(A2:E2))) ,4)

For the last cell address, array entered** :

=ADDRESS(ROW(A2:E2),MAX(IF(A2:E2=1,COLUMN(A2:E2))) ,4)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"wild turkey no9" wrote in message
...

Excel 2003 user here. How do i return the cell reference of the first and
last occurences of a 1 in row?

Thanks in anticipation

Kevin