That’s a good use for Shortcuts, and this is a tiny bit off topic, but do yourself a solid and check out MoneyStats on the AppStore before you settle on that. Just take a peeksie.
It does all that + tells you how much is in any account at any time as long as the data is accurately entered/maintained, among a few other things.