Given your months are in sequence (ascending) you can use MATCH
=MATCH(1,A:A,0) --> first row in which 1 appears
=MATCH(1,A:A,1) --> last row in which 1 appears
Remember of course you can use SUMIF, COUNTIF to sum/count data based on a criteria value.
In VBA terms (misread)
By using Application.Match (as opposed to WorksheetFunction.Match) and storing result as Variant you can test the result to be numeric before doing any subsequent calcs (thereby avoiding debug) ... obviously if vStart is an Error then vEnd should be disregarded.
Bookmarks