How to count by color and sum by color in Excel 2010 and 2013

Source: www.ablebits.com