using sumproduct in excel. There are any references about using sumproduct in excel in here. you can look below.