Forum Discussion
Profit Formula Challenge
- Dec 31, 2020
Don't forget that Twifoo intended the challenge to be an examination of the use of advanced array methods available within traditional Excel. The dislike of CSE is understandable but is simply a by-product of the user-interface design.
As I noted earlier, I had trained myself to commit all formulas with CSE but I would have preferred not to need it. For some reason my proposal to reverse the conventions, that is to use CSE to introduce the additional implicit intersection step and use Enter to allow the calculation to proceed as a simple array operation was not well-received 🙂
I share the views of SergeiBaklan and Twifoo in that I see no need to avoid {1,-1,1,-1} as an array constant on the grounds that the notation is similar to the CSE notation. The array constant is an important element of array calculation. They need to be used with care, not because they are arrays, but because they are constants. If there exists a possibility that they may change, a named variable would be more appropriate than a constant embedded within a formula.
Twifoo I have been one of those following this thread with some interest having enjoyed these kinds of challenges in the past and I concur that an array constant should be preferred to a CHOOSE construction unless of course some of the elements may be variable. Perhaps one of the first instances of a formula similar to your proposed solution was here . Now, in the latest version, XLOOKUP may be used in place of that LOOKUP/FREQUENCY combination.
SergeiBaklan With dynamic arrays MMULT becomes standard operation
Indeed Dynamic arrays extend Excel to operate like other array programming languages with operations such as lifting and broadcasting (but without advanced concepts like multidimensional arrays and tensor products). In this respect MMULT is a fairly straight forward operation requiring no more than high school-level mathematics.