Not sure how to get the right syntax here to represent a variable number of sheets.
The 4 in the formula is the variable part. Whatever number is in Sheets("CtrlPnl").Range("H12") is the total number of sheets. In this example I've just shown 4, but it could be up to 20 or more.
Sub TryThis1() Range("G2").Formula = "=AVERAGE('1:4'!E2)" End Sub