Microsoft is making Excel’s formulas easier
theverge.com
theverge.com
I was forced into doing this because after a year of digging to find out what reporting they wanted in the dashboard (“oh a thousand things… where’s the Excel spreadsheet export button?”), I gave up and now default to giving them all reporting via Excel, using these custom formulas.
Python + xlwings: most successful (relatively speaking) to build custom finance functions in my line of work. Downside is the slowness and deploying on other computers.
Rust + xladd: really enjoyed this but feels immature still. Better performance than python and easier to distribute as single dll.
VBA: options above make this almost obsolete, however can’t beat being embedded.
For the "task pane", if you need one, you can use React or Angular, but I prefer to use Vue (or no front-end framework is fine too).
For the backend logic, just straight up Node + webpack. You could probably do this better with Vite, but I think Microsoft's starter templates all use webpack.
You end up distributing a manifest file that tells Excel which server your assets and API live at.
Warning: hot reload and dev debugging is quite a pain on macOS.
Number one function used. Export to Excel, and normally it is on reports of basic table join queries, none of the advanced things it can do with the data
Turns out lots of people have decided what the conclusion is and are taking that conclusion and the data, and then blindly munging until they get a path which connects them.
But that's a lot of work so businesses don't want to pay for it.
Business data is full of minor inconsistencies which are not obvious until you sit in front of it. Products are sold by different units. Reporting ranges and aggregates are slightly different. Subsidiaries use categories which are close but not exactly identical.
There is generally plenty of massaging to do before you can get the information you need.
AWS is pushing this message on every NFL broadcast with their Next Gen Stats ads. "The data tells us all"
Of course you want to be intellectually honest about it, and I agree that cherry-picking the "right" data can be a big problem in the wrong kind of organization. I remember one time a Jr analyst I managed was asked by the CEO to create a certain chart. I was not looped in. The CEO then used that chart to convince himself and many others on the executive team to make a huge product change that ended up being a complete disaster.
Often, this is learning for me. I have a bunch of Stephen Few’s books and use exported CSV files to figure out which reports are useful to me and my org. When I find them, I do make a request for standardized reporting. These often become the basis for regular review meetings. In those meetings, we still come up with instances where we need to export to CSV and get into the data to understand what we are looking at.
Our work is going through a big shift this year that means our historic data is not helpful in predicting trends. That’s increased the need for this kind of engagement with the underlying data.
Silverlight had positive sounding blog posts, etc... right up until its official death.
These megacorps never officially announce a product's demise, not while they can sell it. You have to read between the lines.
It got a little too big and I rewrote it as a C# desktop application talking to a SQL Server, but it was impressive what this person was able to create with no real programming knowledge and just Microsoft Access.
A lot of comments on HN display disrespect for people using tools like Excel and Access instead of 'doing things properly'.
You acknowledge that the person who built what you replaced was working under constraints and created a system that ran a 50-person company.
Which gains did you or the users get when rewriting to C#? What were the downsides?
The gains were performance. The MS Access application was not backed by a proper database, I forget the exact setup but it was more of just a shared MDB file over the network? Whatever Access was capable of at the time. There were contention/locking issues and all the other sorts of problems you'd expect given the setup. My memory of it is a bit hazy, but I know it was lacking a true database outside of its own MDB format.
Funny story, after the rewrite the software was so succesful internally that we decided to start selling it, and it became one of the industry leaders. The person who wrote it originally was highly knowledgable in their field, and I happened to have decent enough programming knowledge. The two put together ended up with something special.
The execution sucked because Access is/was a terrible database. Poor data integrity, really low limits on the DB size, etc.
I think if Access was as good as SQLlite, it would have really taken off.
Because the salespeople didn't know how to use or sell it yet, I got to be the one to travel to our first customer and train them on it. After showing their CFO how to add our formulas to a couple of cells, make a chart from it, and then hit Shift+F9 to refresh the formulas and get current data from their AS/400, he pushed me away from the keyboard and quickly entered several more formulas to bring in additional data. And then told me I had just saved him three day's work every month when he created charts for his reports to the board.
I eventually left the company, and they got bought a couple of times by ever-bigger software companies. But the product is still out there and is very versatile, having been extended to talk to many different ERP & accounting systems. It even still has the same product name: Spreadsheet Server.
=IFERROR(IF(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(SEARCH("Banner",AC5),SEARCH("EBL2",AC5)),SEARCH("Movie Art",AC5)),SEARCH("Use as is",AC5)),SEARCH("TTT",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1)<IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(SEARCH("Banner",AC5),SEARCH("EBL2",AC5)),SEARCH("Movie Art",AC5)),SEARCH("Use as is",AC5)),SEARCH("TTT",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1),MID(AC5,IFERROR(IFERROR(IFERROR(SEARCH("Customs",AC5),SEARCH("Custom",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1),IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(SEARCH("Banner",AC5),SEARCH("EBL2",AC5)),SEARCH("Movie Art",AC5)),SEARCH("Use as is",AC5)),SEARCH("TTT",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1)-IFERROR(IFERROR(IFERROR(SEARCH("Customs",AC5),SEARCH("Custom",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1)),MID(AC5,IFERROR(IFERROR(IFERROR(SEARCH("Customs",AC5),SEARCH("Custom",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1),IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(SEARCH("Banner",AC5),SEARCH("EBL2",AC5)),SEARCH("Movie Art",AC5)),SEARCH("Use as is",AC5)),SEARCH("TTT",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1)-IFERROR(IFERROR(IFERROR(SEARCH("Customs",AC5),SEARCH("Custom",AC5)),SEARCH("Generic",AC5)),LEN(AC5)+1))),"")
(source: https://www.quora.com/What-is-the-longest-excel-formula-you-... )
Function extractText(cell As Range) As String
' Declare an array of search terms
Dim searchTerms As Variant
searchTerms = Array("Banner", "EBL2", "Movie Art", "Use as is", "TTT", "Generic")
' Initialize start and end positions to 0
Dim startPos As Long
startPos = 0
Dim endPos As Long
endPos = 0
' Loop through search terms and find the first occurrence of any of them in the cell
For Each searchTerm In searchTerms
startPos = WorksheetFunction.Search(searchTerm, cell)
If startPos > 0 Then
Exit For
End If
Next searchTerm
' If none of the search terms were found, try finding "Customs" or "Custom"
If startPos = 0 Then
startPos = WorksheetFunction.Search("Customs", cell)
If startPos = 0 Then
startPos = WorksheetFunction.Search("Custom", cell)
End If
End If
' If none of the above were found, try finding "Generic"
If startPos = 0 Then
startPos = WorksheetFunction.Search("Generic", cell)
End If
' If none of the search terms were found, return an empty string
If startPos = 0 Then
extractText = ""
Else
' Loop through search terms and find the next occurrence of any of them after the start position
For Each searchTerm In searchTerms
endPos = WorksheetFunction.Search(searchTerm, cell, startPos + 1)
If endPos > 0 Then
Exit For
End If
Next searchTerm
' If none of the search terms were found after the start position, set the end position to the end of the cell
If endPos = 0 Then
endPos = Len(cell) + 1
End If
' Extract the text between the start and end positions
extractText = Mid(cell, startPos, endPos - startPos)
End If
End Function
Edit: Sadly this doesn't work at all lol, and after half an hour of prompting ChatGPT can't figure out why, it just gets stuck in a loop :-(The times I've tried using ChatGPT, it has mostly giving me code that seems like it'd work but doesn't.
This took me a full week to make it work and got me a raise, but it is so hacky, I rather not want to maintain that.
Can it run cron jobs, handle api responses etc?
What's the confidence level of copy-pasting random code snippets from Stackoverflow?
-the number of upvotes
-the reputation of the poster
-the post - sometimes posters will say "I haven't tested this"
-comments
With ChatGPT you have no idea.
I wonder if ChatGPT can fix it? (will update if so)
I like to format my formulas with multiple lines and indentation, but to do that I have to hold down [Alt] and mash the spacebar like a caveman.
I am happy with the new features I've been seeing. LAMBDA() and the new TEXT functions are nifty.
There is a designation in the lower left of the window to show whether you're in Edit or Enter mode.
Also, the little designation in the lower left has been there, roughly 30 inches from my eyeballs, for hundreds or possibly thousands of hours. It's changed state thousands if not millions of times. How have I only just now seen it?
https://i.imgur.com/6yrULDU.png
The poor programmer at Microsoft who invented the mode switching feature would be justifiably infuriated by the blindness of his users...
Haha. I'm in the same boat. When writing my comment, I opened Excel, clicked on a cell, and tapped F2 repeatedly, just to see if there was anything on the screen that changed...
Not consistent with any program I know onWindows, Linux, macOS, or even ye olde Macintosh System Software, unless you count spreadsheet programs that are trying to be more like Excel.
Not even consistent inside Excel, because there are many edit fields that default to "evil mode" (my personal feeling about "insert cell references when arrows keys are pressed, and disable Undo", while some default to "normal text editing mode", and some cannot be placed in "evil mode".
I'd like a visual indicator on or adjacent to the text box, and setting to force it to default to one mode or the other.
> to do that I have to hold down [Alt] and mash the spacebar like a caveman.
Even worse, I spend a good chunk of time in Power BI, and it has a similar formula field (for DAX expressions), that mimics Excel a bit, but there you use [Shift] to insert newlines. So I'm always using the wrong modifier key and spewing insults at my computer.
Exactly, there should be a contextual difference between editing in the cell directly or via the formula bar, when in the formula bar tab and enter should insert a tab or new line. Comment/Ctrl Enter (committing the change) or Escape (reverting the change) should be the only way to exit the formula bar via the keyboard.
Beside clicking on a cell already has a meaning, it inserts the address of the cell you are clicking on in the formula.
I don't want Excel to change the default behavior. The way it works now is the right way for most people. I just want to be able to enter a mode where I get to freely edit the formula as if it were in a text editor, then exit that mode when I'm satisfied. Whether that is some checkbox option buried in the settings ("Options > Formulas > Working with formulas"), or an F-key, I don't care.
Normally the first one commits the formula, the second one inserts a newline. I want to reverse that and make a naked [Enter] insert the newline, and the [Alt]+[Enter] commit the formula.
Committing a formula needs to be a simple shortcut because it has to be used by the least technical users. You don't want to create a "how to exit VIM" mess in a retail product.
#if IsExcelFormulaBox() ; Whenever the formula edit box has focus
Tab::Send {Space}{Space}{Space}{Space} ; insert four spaces when I hit [Tab]
$!Enter::Send {Enter} ; commit the formula with [Alt]+[Enter]
$Enter::Send !{Enter} ; insert a newline with bare [Enter]
#if
does what I want, with the helper function: IsExcelFormulaBox() {
ControlGetFocus, F, A
return (F="EXCEL<1")
}https://www.microsoft.com/en-us/garage/profiles/advanced-for...
Here's a real example where I'm listing the unique items from a data table that meet user-supplied threshold criteria:
=UNIQUE(
FILTER(
data[Front Page Formatted],
(data[Completed Month] = L$27) *
(data[Expedite Rate in Month] >= cutoff_rate) *
(data[Tickets in Month] >= cutoff_volume),
"None"
)
)
Those three filter criteria are booleans that are multiplied together. (Huh, should I have used AND() instead?) If all three are true, then the resulting list is UNIQUE'd and shown on the report page.https://news.ycombinator.com/item?id=34178298
(Except I decided to go with 4 spaces from the tab key. I'll see what's up with pasting a literal tab. Maybe that's better)
Your grids can overflow with a scroll bar, so I can put one table above another one without them colliding when the top one expands.
You can do that in a backward compatible way, if a canvas is not defined on an old spreadsheet, just assume one canvas that contains one grid set to full screen.
It helps presentation, it helps splitting the logic of your spreadsheet in discrete components, I only see upside.
But this is exactly what competition is about -- I love seeing this come to Excel precisely as an answer to Google's version. You have to wonder if Microsoft would have tried it otherwise, since Excel is so entrenched there's less profit motivation for innovating.
Sometimes it feels like "office" software hasn't changed much since the 90's, but when you look at cloud, collaboration, and machine learning, it's still constantly reinventing itself even if the interface still looks largely the same.
[1] https://www.theverge.com/2021/8/26/22642192/google-sheets-in...
It's pretty impressive, especially since my impression is that it's mostly one person's hobby project.
[0] http://ellx.io
Example: https://ellx.io/ellx-hub/lib
One thing is that it's possible that Ellx uses exceptions to detect time series and lift regular functions into time series functions. I'm not sure the implementation details. There are all kinds of ways exceptions can be abused to implement near-magic. (I believe there's a library that uses exceptions in OCaml to implement coroutines.) I wouldn't be surprised if Ellx used some try-catch near-magic that doesn't quite work on Safari.
I’ve found various JS notebooks like starboard and observable JS to be the closest thing, but they’re really not there. PowerBI is a Microsoft solution but it’s dashboard focused.
My #2 wish is a way for it to automatically break down and indent nested function calls for readability. The color coded brackets help, but only a little.
https://support.microsoft.com/en-us/office/let-function-3484...
It drives me up the wall each time I have to use Excel and hunt for the right function name. And I'm a native Norwegian!
If you don't known have test input (e.g. an array of values) for which you have known output to observe for such an opaque programming language, you will be bitten! This innovation just makes it even more important.
That said Excel lets non-programmers create visual representations of data on a regular basis, and everyone has it on their desktop so there's no, "I can't use this" excuse.
=IIF(foobar, pv(a1:a100), IFERROR(fv(b1:b100), 0));
You can do this using alt-enter: =IIF(
foobar,
pv(a1:a100),
IFERROR(
fv(b1:b100),
0
)
);When a company makes a multi-million dollar error because an analyst used ChatGPT formulas in Excel, I expect we'll get the answer.
I think last time I looked (~3 years ago) PyXLL seemed most advanced, useuful, integrated, least buggy, but requires subscription after 30 days.
edit: maybe that tone is necessary to convince people that this is a story at all.
https://superintendent.app (paid with free trial) enables you to load a bunch of CSVs and write SQL on those CSV files.
It's a much faster to work with if you know SQL well. It can also handle millions of rows easily (e.g. Loading 1GB CSV file takes 10s on Macbook Pro). Excel can't load a CSV larger than 1M rows.
I initially built it because I had to identify the mismatched transactions between 2 giant CSVs using. Using "full outer join" with Superintendent.app took only a minute to do.