Data Analysis Using Excel Array Formulas 

Excel array formulas are useful and
powerful
formulas to summarize your spreadsheet data. You have the option of
using a single or multiple criteria to summarize your worksheet data
and also create a customized report. How to implement array formulas in Excel




Some knowledge about how the array formulas work in the background 

Place your cursor in cell E12 where the value '66' is displayed. Press 'F2' to view the formula. In the formula bar above now select 'product="Shirts" ' and press 'F9'. You'll notice 'FALSE' and 'TRUE' displayed. Wherever the value 'shirts' is available, 'TRUE' is displayed otherwise 'FALSE' is displayed. 

Now select 'quantity' and press 'F9' on the keboard to display the 'quantity' of shirts. 

Only where the 'shirts' is 'TRUE' the 'quantity' values are added and you get the result '66'. In this last image below you select both 'product="Shirts" ' and 'quantity' and press 'F9' to see all the background data. 

Further reading  