Announcing New Text and Array Functions
Published Mar 16 2022 11:41 AM 251K Views
Microsoft

September 29th 2022 Update
These functions are now fully deployed to Excel for the Web and users of Office 365 on the Current Channel.

 

I’m thrilled to share with you the availability of 14 new Excel functions designed to help you more easily manipulate text and arrays in your worksheets. 

 

Text Manipulation Functions

When working with text, a common task to complete is “break apart” text strings using a delimiter. You can already do this with combinations of SEARCH, FIND, LEFT, RIGHT, MID, SUBSTITUTE, and SEQUENCE, but we’ve heard from many of you that these can be challenging to use.

 

To make it easier to extract the text from the start or end of a cell’s contents, we are releasing two functions that simply return everything before or after your selected delimiter. Welcome, TEXTBEFORE and TEXTAFTER!

 

We’ve also made it easy to “split” text into multiple segments using TEXTSPLIT. Each text segment is then automatically spilled into its own cell through the magic of dynamic arrays. 

Text 1.gif

 

• TEXTBEFORE - Returns text that’s before delimiting characters

• TEXTAFTER - Returns text that’s after delimiting characters

• TEXTSPLIT - Splits text into rows or columns using delimiters

Array Manipulation Functions

Since the release of dynamic arrays in 2019, we’ve seen a large increase in the usage of array formulas. To make it easier to build compelling spreadsheets using dynamic arrays, we are releasing a collection of 11 new array manipulation functions.  

 

Combining Arrays

It can be challenging to combine data, especially when their sources are flexible in size. With VSTACK and HSTACK, you can easily combine dynamic arrays, stacking your data vertically or horizontally. 

 

Combining 2.gif

 

  • VSTACK - Stacks arrays vertically
  • HSTACK- Stacks arrays horizontally

Shaping Arrays

It has been challenging to change the “shape” of data in Excel, especially from arrays to lists and vice versa. If you find yourself with a two-dimensional array that you would like to convert to a simple list, use TOROW and TOCOL to convert a 2D array into a single row or column of data. 

 

Using the WRAPROWS and WRAPCOLS functions, do the opposite: create a 2D array of a specified width or height by “wrapping” data to the next line (just like the text in this document) once your chosen width/height limit is reached. 

 

Shaping Short 2.gif

 

  • TOROW - Returns the array as one row
  • TOCOL - Returns the array as one column
  • WRAPROWS - Wraps a row array into a 2D array
  • WRAPCOLS - Wraps a column array into a 2D array

 

Resizing Arrays

Arrays too large? No problem. Enter the TAKE and DROP functions! They enable you to reduce your arrays by specifying the number of rows to keep or remove from the start or end of your array.

 

Similarly, using CHOOSEROWS or CHOOSECOLS, you can pick specific rows or columns out of an array by their index.

 

EXPAND allows you to grow an array to the size of your choice—you just need to provide the new dimensions and a value to fill the extra space with. 

 

Resizing Short 1.gif

 

  • TAKE - Returns rows or columns from array start or end
  • DROP - Drops rows or columns from array start or end
  • CHOOSEROWS - Returns the specified rows from an array
  • CHOOSECOLS - Returns the specified columns from an array
  • EXPAND - Expands an array to the specified dimensions

 

Scenarios to try

  • Use “ “ (space) as a delimiter with TEXTBEFORE to extract the first name and TEXTAFTER to extract the last name 
  • Use TEXTSPLIT to separate the names into an array with “ “ (space) as a delimiter 

 

When you want to combine two ranges of data: 

  • Use VSTACK to combine two ranges of data vertically 
  • Use HSTACK to combine two ranges horizontally 

 

Availability 

These functions are currently available to users running Beta Channel, Version 2203 (Build 15104.20004) or later on Windows and Version 16.60 (Build 22030400) or later on Mac.

 

Don’t have it yet? It’s probably us, not you.

 

Features are released over some time to ensure things are working smoothly. We highlight features that you may not have because they’re slowly releasing to larger numbers of Insiders. Sometimes we remove elements to further improve them based on your feedback. Though this is rare, we also reserve the option to pull a feature entirely out of the product, even if you, as an Insider, have had the opportunity to try it.

 

Feedback

If you have any feedback or suggestions, you can submit them by clicking  Help > Feedback. You can also submit new ideas or vote for other ideas via Microsoft Feedback.

 

Want to know more about Excel? See What's new in Excel and subscribe to our Excel Blog to get the latest updates. Stay connected with us and other Excel fans around the world – join our Excel Community and follow us on Twitter.

 

Joe McDaid (@jjmcdaid)
Program Manager, Excel

 

241 Comments

Excel team, thank you! Great set of new functions.

Silver Contributor

This is great. Thank you and can't wait to see them in the current channel.  It is amazing how many improvements are rolling out recently.

Copper Contributor

An excellent set of new functions that will solve many hard problems in Excel. Great work!

Copper Contributor

Awesome! Awesome! I've been dreaming about TEXTSPLIT() now it's finally here.

Copper Contributor

Thank you for these invaluable additions. :cool:

Brass Contributor

When will these functions be available in Excel? I just tried a few that did not work.

Copper Contributor

What a day! TEXTSPLIT is natively available. This is great. Can even handle multiple delimiters. Wow. TOROW and TOCOL will save us all the INT.MOD,ROUND,SEQUENCE for appending multiple rows/columns into one. Very good developments.

 

For the TEXTSPLIT, maybe an optional instance number argument may be helpful, I can wrap an INDEX around the TEXTSPLIT and return the nth element, but maybe just having the TEXTSPLIT do all may not be bad

 

Keep up the great work Joe and team

Copper Contributor

This is awesome...thanks for the innovation!

Copper Contributor

TEXTSPLIT for the win!

Copper Contributor

Congrats Excel Team, that's what I've been waiting for. Nice job.

Exciting stuff,  great work Excel Team!

Brass Contributor

Excellent work! Thank you for these functions.

 

But I have suggestion with regard to the ToRow and ToCol (also ByRow, and ByCol). Instead of two separate functions, couldn't have we done it with an extra argument?


For instance we could have had something like Stack(Rng,0) to do a ToCol and Stack(Rng,1) to do a ToRow? That would make life much easier to control the shape based on user input or any other run time calculations. I know I can still do it with a switch function (or wrap it in a Lambda to make my own stack function). But an extra parameter would have been far more efficient, in my view.

Iron Contributor

Excel Team -When it rains it pours !!! -  This is simply Brilliant - Cant wait till it comes to the Current Channel Preview

Couple of suggestions

TEXTBEFORE and TEXTAFTER can have optional parameters viz. No of Delimiters to Skip and Direction

This would then become similar to the PQ functions

Text.Before(After)Delimiter(text,dl,{2,RelativePositon.FromStart}) 

 

So TEXTBEFORE(txt,dl,2,0) or TEXTBEFORE(txt,dl,2,1) 

 

VSTACK/HSTACK - Just perfect !

So now we can put the Header Row of the Data on top of the Array returned by the FILTER Function

VSTACK(D[#Headers],FILTER(D,D[Name]="BRUCE"))

HSTACK - is just revolutionary - I mean VSTACK has equivalents in s Table.Combine or UNION- But there is just no easy way to do what HSTACK is doing in PQ or SQL

 

TEXTSPLIT - The ability to split with multiple delimiters per row and column is wonderful - a much much awaited function.

The rest of them are also going to revolutionize the the ability to handle arrays

 

Cheers

Sam

 

[Edit]: These functions just rolled out for me yesterday - TEXTBEFORE/TEXTAFTER  does have an Instance number parameter and a negative sign indicates from end of string !!! - Great

 

 

 

Silver Contributor

I don't know, making my newly acquired Lambda function skills redundant before they even hit the road!

Seriously, they are a great contribution to the new calculation environment and bypasses a lot of messing around with indices.

 

Mind you, the elephant in the room is still the problem of arrays of arrays.  If one accepts that the defining feature of spreadsheets is the two-dimensional array, of which the most common manifestation is the list of records, it is unfortunate that to create such objects with DA formulas requires Herculean efforts using thunks!  I still have a problem describing a thunk down at the pub; no wonder I finish up drinking alone (grin)!

Copper Contributor

When, oh when will certain features reach the Caribbean! 

Copper Contributor

Using these array functions in VBA environment will greatly improve the array operation ability of VBA.The old VBA is full of new vitality. Excel is the constantly updated Package of VBA.

Copper Contributor

Awesome. Thank you!

Copper Contributor

My take on array functions: https://github.com/xlladdins/xll_array.

Why so many new names? RESIZE(array, rows, cols) covers both TO and WRAP for both rows and columns. Similarly, my INDEX(array, rows,cols) function allows rows or cols to be arrays if indices. If they are missing then all rows/cols are returned. You should also have a GRADE function.

See docs at https://xlladdins.github.io/xll_array/

Copper Contributor

Salam, I am from Karachi, a Professionally retired Banker and Teacher. I am not using Beta Channel, Version 2203 (Build 15104.20004), but I have seen a youtube video regarding the tremendous change. It's a fantastic effort.

Hopefully, these features will be available in Excel soon.

 

Regards

Mushtaq Ali

Copper Contributor

Amazing long time waiting for this new functions.

God bless you Microsoft 

Copper Contributor

Im so looking forward to using and teaching these new commands ! Thank you. 

Iron Contributor

Very niiiiiiiiice!

Copper Contributor

Awesome. Thanks.

Copper Contributor

Awesome! Such a time saver. When do we get to start using these new commands?

Copper Contributor

This is really exiting. Thank you MS Excel Team..!!! Awaiting till releasing those functions to O365 users.

Copper Contributor

Please push them out!  thanks

Copper Contributor

Hello,
I use version 2204, but I can't use the new formulas. What could be the reason?

 

beta.jpg

 

muratosma_0-1647733880052.png

 

Copper Contributor

I have the same problem too. Please anyone to Help 

Copper Contributor

I wrote those functions as lambda functions a while back to emulate APL array processing, e.g turning a list into an array (with a default value to pad it if necessary)

LIST.LAMINATE =LAMBDA(list,ncols,nrows,default,LET(inlist,IF(COLUMNS(list)>1,list,TRANSPOSE(list)),IFERROR(INDEX(inlist,1,SEQUENCE(nrows,ncols)),default)))

So nice to see them done natively.

 

Others you could think about doing which I currently implement and use in lambda functions:

LIST.INTERSECTION (list1,list2) - returns only those items which are in both lists

LIST.REVERSE (list) - reverses the order of items in a list
LIST.ROTATE(list,n) - cyclically shifts items in the list, n places to the left or right (+n,-n)

ARRAY.PUSH and ARRAY.PULL (to use a list or array as a stack)


But really a good start.

 

 

Copper Contributor

Your comments are spot on, but I've seen no evidence Microsoft responds to this sort of user feedback. I am very happy to see they are devoting resources to updating native Excel functionality and think the new functions are definite improvements, but they do not seem to have an ISO level process to allow expert users to have any input on the changes they make.

Joe McDaid hasn't responded to any of the comments here. Talk to us Joe.

 

Copper Contributor

TEXTSPLIT! i have just a couple of months ago figured out how to make my own and now its obselete :cry:

Iron Contributor

thrilled , roller coaster ride....

BUT it is still not available

Copper Contributor

Wonderful.

I used LAMBDA to build VSTACK and TEXTSPLIT functions last year. Glad to know they are now available natively. I can't wait to have them in the regular channel.

Copper Contributor

These Excel Functions Are Really Cool. Thanks Excel Team!

Copper Contributor

Just last week I lamented that a function like TEXTSPLIT was not natively available. Waiting (not so patiently) to have access as I'm on version 2204. 

Copper Contributor

@JoeMcDaid I suggest the name of the DROP function in Spanish would be QUITAR, instead of DEPOSITAR.

Copper Contributor

@JoeMcDaid Here my proposals for the name of the new functions in Spanish.

 

sergioacamposh_0-1647893862634.png

 

Copper Contributor

... news functions not yet available !!

Copper Contributor

Hi Everyone, Just want to ask if why the new formula "Textsplit" is not available in Office 365? any suggestion how to update my office 365? Thank you in advance.

Copper Contributor

For those asking why the functions aren't available, the article tells you: 

"Don’t have it yet? It’s probably us, not you.  Features are released over some time to ensure things are working smoothly. We highlight features that you may not have because they’re slowly releasing to larger numbers of Insiders."

Copper Contributor

Please Please Oh Please make HSTACK and VSTACK pickup the current regions of cells - VSTACK(B2, F2) rather than VSTACK(B2:D3, F2:H3) - or requiring convoluted index functions.  And combine the data ranges of separate tables....

Copper Contributor

@Bernie Deitrick Did you try VSTACK(B2#, F2#)? That should pass in the dynamic range.

Copper Contributor

Awesome! Great set of new functions.

Copper Contributor

Great! I'm so excited to use the new functions introduced but not yet available. Can someone help? Please...

Copper Contributor

Great news !

 

When will these functions be available on Web Version ?

@David_MONTET , I guess nobody know, even Microsoft. That's iteration process - part of Beta, full Beta, Current(Preview). Deployment depends on feedback and stats collected. Somewhere in the middle Excel for Web... Hope soon.

@Rosy_Bell678 , are you on Beta channel?

@JoeMcDaid Documentation seems to be incorrect here:

https://support.microsoft.com/en-us/office/textafter-function-c8db2546-5b51-416a-9690-c7e6722e90b4 

 

textafter-error.png

 

The items below return #VALUE! instead of #N/A

 

  • Excel returns a #N/A error if text is an empty string.

  • Excel returns a #N/A error if delimiter isn't contained in text.

Copper Contributor

Can someone show an example of TEXTSPLIT with Ignore_Empty = FALSE vs TRUE? I can't access these functions yet and really don't get this point.

@markFitzpatrick , like this

image.png

Version history
Last update:
‎Sep 29 2022 12:06 PM
Updated by: