- Why are we using Cell("Col", X:X) instead of just Column(X:X)...
When nested inside SUMPRODUCT(), COLUMN(Range) actually returns array of column index, where as if you use it alone it will evaluate to single value .
Cell("Col",Range) in this instance can be replaced with contant (2). Since starting column will always be 2.
Taking C7 for example...
=SUMPRODUCT($B$4:C$4,N(OFFSET($B5:C5,0,COLUMNS($B5:C5)-COLUMN($B5:C5)+CELL("Col",$B5:C5)-1)))
Becomes...
=SUMPRODUCT($B$4:C$4,N(OFFSET($B5:C5,0,2-{2,3}+2-1)))
=SUMPRODUCT($B$4:C$4,N(OFFSET($B5:C5,0,{1,0})))
=SUMPRODUCT({1,0},{18,12})
=18
- How is using N helping the formula?
Basically it's used to produce usable array from embedded array. In this case from OFFSET(Range,0,{Array}). Read through link below for the concept.
https://newtonexcelbach.wordpress.com/2013/01/01/using-excels-shortest-functions/
Edit: Actually formula can be shortened to below in this case.
=SUMPRODUCT($B$4:B$4,N(OFFSET($B$5,0,COLUMNS($B5:B5)-COLUMN($B5:B5)+1)))