The formula is B3==SUMIFS('Fac'!AE:AE, 'Fac'!E:E, 1, 'Fac'!AE:AE, NUMBERVALUE(AG3)). This formula is for a column and thus AG row number changes as B column row number changes.
Explanation
AG3: This is a relative reference to the AG cell in the same row as the formula in the B column. As you drag the formula down, AG3 will change to AG4, AG5, etc., automatically.
SUMIFS: This function will sum the values in the AE column of the Fac sheet where the E column is 1 and the AE column matches the numeric value of the corresponding AG cell.
Would really appreciate some help in this. Thanks!
Please find the sample data down below!