Hi ,
SUMIF / SUMIFS are used only where criteria which span an entire range are involved e.g. you might want to sum all positive numbers , all those numbers greater than a threshold limit , all those numbers whose corresponding value in a second column satisfy some other criterion ....
In your case , you want to sum the first 40 numbers ; this is simply done by :
=SUM(OFFSET($B$2,,,40))
Narayan