Thread: Excell function
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Daly Daly is offline
external usenet poster
 
Posts: 4
Default Excell function

Thank you Leo ,I tried your solution but it doesn't work ,the result was
right for the first cell (c1) but the others (c2:c9) were #N/A

can you help please
--
thank you & best regards


"Leo Heuser" wrote:

Daly

Here's a shorter (and not so ugly :-) one. Still an array formula and C1
must be empty (and present!).
Copy until the cell returns a #REF! error.

In C2:

=INDEX($A$2:$A$11,IF(ROW()-ROW($C$2)<$B$2,1,MATCH(ROW()-ROW($C$2)+1,
SUMIF(OFFSET($B$2,,,ROW(INDIRECT("1:"&ROWS($B$2:$B $11)))),"<")+1)+1))


Leo Heuser


What I meant was:
Still an array formula and C1 need *not* be empty or present at all,
i.e. the formula may start in row 1.


Leo Heuser