I have a code which using SumIfs formula, but I want to improving the code to more short. Could someone to fix my problem. Thanks in advance.Sub Age_Range_1()ThisWorkbook.Sheets(Sheet1).ActivateWith ActiveSheet'Age Range<1.Range(H83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), < & 1, _                             Sheets(db_formOver).Range(F2:F5000), Man, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value)'Age Range <1.Range(O83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), < & 1, _                             Sheets(db_formOver).Range(F2:F5000), Women, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value) 'Age Range 1-14.Range(I83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 1, _                             Sheets(db_formOver).Range(E2:E5000), <= & 14, _                             Sheets(db_formOver).Range(F2:F5000), Man, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value).Range(P83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 1, _                             Sheets(db_formOver).Range(E2:E5000), <= & 14, _                             Sheets(db_formOver).Range(F2:F5000), Women, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value) 'Age Range 15-19.Range(J83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 15, _                             Sheets(db_formOver).Range(E2:E5000), <= & 19, _                             Sheets(db_formOver).Range(F2:F5000), Man, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value).Range(Q83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 15, _                             Sheets(db_formOver).Range(E2:E5000), <= & 19, _                             Sheets(db_formOver).Range(F2:F5000), Women, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value) 'Age Range 20-24.Range(K83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 20, _                             Sheets(db_formOver).Range(E2:E5000), <= & 24, _                             Sheets(db_formOver).Range(F2:F5000), Man, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value).Range(R83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 20, _                             Sheets(db_formOver).Range(E2:E5000), <= & 24, _                             Sheets(db_formOver).Range(F2:F5000), Women, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value)'Age Range 25-49.Range(L83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 25, _                             Sheets(db_formOver).Range(E2:E5000), <= & 49, _                             Sheets(db_formOver).Range(F2:F5000), Man, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value) .Range(S83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), >= & 25, _                             Sheets(db_formOver).Range(E2:E5000), <= & 49, _                             Sheets(db_formOver).Range(F2:F5000), Women, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value)'Age Range >50.Range(M83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), > & 50, _                             Sheets(db_formOver).Range(F2:F5000), Man, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value)   .Range(T83).Value = _    WorksheetFunction.SumIfs(Sheets(db_formOver).Range(AK2:AK5000), _                             Sheets(db_formOver).Range(E2:E5000), > & 50, _                             Sheets(db_formOver).Range(F2:F5000), Women, _                             Sheets(db_formOver).Range(R2:R5000), = & Sheets(Sheet1).Range(D7).Value)  End With  End Sub
SumIFs code VBA Excel
vba;excel