Like the others, in reality, I would adjust the input data format. However, to accept the challenge, here are a couple variants on a solution. Each one is given by a single array formula and shares the same set-up costs.
= IFERROR( INDEX( area.sales, MATCH( item, area.commodity, 0 ) ), 0 )
or
= SUMIFS( area.sales, area.commodity, item )
In either case the set-up defines the ranges within the original data table associated with each of the areas
= INDEX(Sales, start) : INDEX(Sales, end)
= INDEX(Commodity, start) : INDEX(Commodity, end)
where both 'start' and 'end' are indices returned by MATCH
= IFERROR( MATCH( area.previous, Areas ), 0 ) + 1
= MATCH( area.current, Areas ) - 1