Alex,
This is one possible solution. I created a named range "John" with the formula below. Cell N1 contains a date. Cell L2 contains the formula =COUNTIF(John,"Sales") and will return the number of cells under John after the date entered in Cell N1.
=OFFSET(INDIRECT("I"&MATCH(Sheet1!$N$1+1,Sheet1!$B$1:$B$30,0)),0,0,COUNTA(Sheet1!$I:$I),1)
Example1.xls
Hopefully this will be useful.
Gary
Bookmarks