Live data from Hacker News

Microsoft is making Excel’s formulas easier

theverge.com

41–50 of 141 posts

Re: Microsoft is making Excel’s formulas easier

#41
If I had to ask for one killer new feature in Excel, it would be to adopt Apple's numbers approach to the design of a spreadsheet. I.e. not one grid per tab, but one canvas per tab, and that canvas can contain multiple elements which can be grids, charts, pivot tables, something else.

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.

Re: Microsoft is making Excel’s formulas easier

#42

Will it give us beauts like this?: =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) (source: https://www.quora.com/What-is-the-longest-excel-formula-you-... )

Don't even think about getting a CSE right the first time.

Re: Microsoft is making Excel’s formulas easier

#43

Recently I started building Excel addons with custom formulas (e.g. =company.inventory(upc, WAREHOUSE), which call an api. This has blown the minds of non-tech folks among my clients. They equate this to magic. 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 de…

Yep, we have a expensive reporting tool, can too all kinds of things, query every type of database we have...

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

Re: Microsoft is making Excel’s formulas easier

#45

Will it give us beauts like this?: =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) (source: https://www.quora.com/What-is-the-longest-excel-formula-you-... )

For fun, I took this formula and asked ChatGPT to convert it to a VBA Function (with comments):

    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 :-(

Re: Microsoft is making Excel’s formulas easier

#46
Well, shameless plug.

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.

Re: Microsoft is making Excel’s formulas easier

#47
post #45

Will it give us beauts like this?: =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) (source: https://www.quora.com/What-is-the-longest-excel-formula-you-... )

For fun, I took this formula and asked ChatGPT to convert it to a VBA Function (with comments): 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…

Did you actually try running the code vs the formula and compared it works the same way in the expected cases?

The times I've tried using ChatGPT, it has mostly giving me code that seems like it'd work but doesn't.

Re: Microsoft is making Excel’s formulas easier

#48

My current #1 wish for Excel formula entry: Please let me use [Tab] and [Enter] in the formula bar without trying to commit the change! 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.

Give AFE a whirl, you can format and comment formulas

https://www.microsoft.com/en-us/garage/profiles/advanced-for...

Re: Microsoft is making Excel’s formulas easier

#49
post #46

Well, shameless plug. 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…

You are eventually gonna have to write comments about other things than just plugging your own projects, especially when they are just barely on topic.

Re: Microsoft is making Excel’s formulas easier

#50
As noted, Google Sheets introduced this over a year ago [1].

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...

Post reply on HN