The formula is as follows,
SUMIFS(OFFSET($V$37,MATCH($V93,$V$37:$V$83,0)-1,MATCH(0,$AA$37:$NX$37,0)+4,1,1000),OFFSET($V$37,0,5,1,1000),">"&AB