Google Sheets has a cool Query formula that might help you for this case.
Here’s one I have modified from the community to make a table from the Accounts sheet:
=QUERY({INDIRECT("'Accounts'!$L$2:$L"),INDIRECT("'Accounts'!$J$2:$J"),
ARRAYFORMULA(IF(INDIRECT("'Accounts'!$O$2:$O")="Liability", -INDIRECT("'Accounts'!$I$2:$I"), INDIRECT("'Accounts'!$I$2:$I"))),
ARRAYFORMULA(IF(ISBLANK(INDIRECT("'Accounts'!$J$2:$J")),"", TODAY()-INDIRECT("'Accounts'!$H$2:$H"))),
ARRAYFORMULA(IF(ISBLANK(INDIRECT("'Accounts'!$J$2:$J")),"", LEFT(INDIRECT("'Accounts'!$G$2:$G"),6))),
INDIRECT("'Accounts'!$O$2:$O"),INDIRECT("'Accounts'!$Q$2:$Q")},
"SELECT Col1, Col2, Col3, Col4
WHERE Col1 IS NOT NULL AND Col7 <> 'Hide'
ORDER BY Col6, Col1, Col2
LABEL Col1 'Institution', Col2 'Account', Col3 'Last Balance', Col4 'Last Update'
",0)
The query formula resides in the upper-left corner of the table, and the rest of the table is magically filled with the data
Or, maybe something like this to only include certain Accounts that are listed in another column. Change A3:A to your location.
=QUERY({INDIRECT("'Accounts'!$L$2:$L"),INDIRECT("'Accounts'!$J$2:$J"),
ARRAYFORMULA(IF(INDIRECT("'Accounts'!$O$2:$O")="Liability", -INDIRECT("'Accounts'!$I$2:$I"), INDIRECT("'Accounts'!$I$2:$I"))),
ARRAYFORMULA(IF(ISBLANK(INDIRECT("'Accounts'!$J$2:$J")),"", TODAY()-INDIRECT("'Accounts'!$H$2:$H"))),
ARRAYFORMULA(IF(ISBLANK(INDIRECT("'Accounts'!$J$2:$J")),"", LEFT(INDIRECT("'Accounts'!$G$2:$G"),6))),
INDIRECT("'Accounts'!$O$2:$O"),INDIRECT("'Accounts'!$Q$2:$Q")},
"SELECT Col1, Col2, Col3, Col4
WHERE Col1 IS NOT NULL AND Col7 <> 'Hide' AND Col2 matches '" &TEXTJOIN("|",true,A3:A)& "'" & "
ORDER BY Col6, Col1, Col2
LABEL Col1 'Institution', Col2 'Account', Col3 'Last Balance', Col4 'Last Update'
",0)