Thank you Ali.dmcc for your query. As your problem involves multiple numerical criteria, you can use the following format of the SUMIF function to solve the problem.
=SUMIFS(Amounts, Account Codes, ">=210000", Account Codes, "<=219999")
Here you need to modify the formula according to your range...