If you are trying to collate sales, cost of sales etc. and have excel 2007 or later try =SUMIFS($C:$C,$A:$A, ">=4000",$A:$A,"<5000"), this will give you sales, and so on. You should be able to refine the criteria to get whatever splits you are after.

If you don't have excel 2007 or later, you could change the GL numbers to text and use wildcards in the SUMIF, such as =SUMIF($A:$A,"4*.???",$C:$C ), but it is less elegant.