Yes there is and I suggest to use it. But it’s not a one simple formula. Anyways once written should be much faster. And correct Maybe start with example from here which features both solution with Group Loop and without it:
Additionally this is a good post (and long as well!) from @takbb where he describes together with example how to use “global variables” inside Column Expressions node:
Additionally this is also possible with other programming languages (nodes) as Java and Python but if you are not familiar with it go with Column Expressions.