Here is my best guess at your question:
This formula in D4:
=SUMPRODUCT(('Estimate Amounts'!$B$3:$J$31=C$2)*('Estimate Amounts'!$B$4:$J$32=$A4),'Estimate Amounts'!$C$6:$K$34)+SUMPRODUCT(('Estimate Amounts'!$B$41:$J$61=C$2)*('Estimate Amounts'!$B$42:$J$62=$A4),'Estimate Amounts'!$C$43:$K$63)
copied down, then select the D14:D19 range and copy to all the other red ranges.
This formula looks at all the upper blue cells in the top 2 tables of the source sheet, and the next wider blue cells below and matches them to the project headers in Row 2 of Sheet2 and the Activities in column A of Sheet2, respectively, then sums up the matches of the Actual Hours (either under the peach cells in upper table or next to peach cells in second table).
Bookmarks