Hacker News new | ask | show | jobs
by zamadatix 1665 days ago
Using newer Excel you also have the power of making custom named functions with LAMBDA() which can also recurse (I think the stack limit is 1024). If you combine this with the idea of columns or rows as iterations of the memory with some of the array functions like MAKEARRAY() and relative position functions like OFFSET() or INDIRECT() you can do pretty much any reasonably sized computation without needing iterative calculation enabled.

The reason being Excel is a tool designed for performing operations on tabular data not designed for general data programming. If you needed programming there was always VBA which was proper so they never wanted to muck it up. LAMBDA made its way in because people wanted reusable function compositions for their tabular data without having to enable the security PITA that is allowing full macros/VBA which can do a lot more than interact with just the data inside the spreadsheet.

2 comments

Many people stop at VBA, but you can grow beyond it into full VB via .NET Office automation and AddIns, or if feeling miserable, COM in C++.

Additionally if only data transformations are required, there is the F# inspired Power Query.

vba is fine but it seems to exist halfway outside the calculation chain space that sheets and cells operate in. excel can work with it, but one has to be quite careful with function returns and parameters.

offsets and indirects also exist in that twilight zone being volatile functions.

these three combined can bring down a reasonably sized spreadsheet.