You are welcome.
Glad I was able to help!
Note that there is a similar COUNTIF function, which counts the matching records, instead of summing them.
And there are also similar SUMIFS and COUNTIFS functions, which do the same thing, but allow for multiple criteria (instead of just one single one).
Lots of great Excel functions!