• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

New Array Shaping Excel Functions

You are here: Home / Excel Formulas / New Array Shaping Excel Functions
excel shaping arrays
October 6, 2022 by Mynda Treacy

Microsoft recently released 11 new Excel functions for shaping arrays (data). I already covered VSTACK and HSTACK which was super popular, and in this post I’m going to use some of the other new functions to do things that used to require ninja level function wrangling.

You can see the individual tutorials covered in the video or read about them at the links below:

EXPAND Function Expands or pads an array to a specified number of rows and columns.
TOROW Function Returns the array in a single row. Useful for combining data across multiple columns and rows into a single row.
TOCOL Function Returns the array in a single column. Useful for combining data across multiple columns and rows into a single column.
WRAPROWS Function Lets you wrap (reshape) a row or column of values into rows, you specify the number of values in each row.
WRAPCOLS Function Lets you wrap (reshape) a row or column of values into columns, you specify the number of values in each column.
DROP Function Remove a specified number of contiguous rows or columns from the start or end of an array.
TAKE Function Extract a specified number of contiguous rows or columns from the start or end of an array.
CHOOSEROWS Function Extract rows from the specified column or columns.
CHOOSECOLS Function Extract columns from the specified rows or rows.
VSTACK Function Combine arrays arranged vertically (VSTACK) into a new single array.
HSTACK Function Combine arrays arranged horizontally (HSTACK) into a new single array.

Note: these functions are only available to Microsoft 365 users.

Watch the Video

Subscribe YouTube

Download Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the Excel Workbook and follow along. Note: This is a .xlsx file please ensure your browser doesn't change the file extension on download.

Nested Array Shaping Functions

Individually the new array shaping functions are amazing, but team them up and you can create some super useful formulas.

In the table below I have a list of postcodes and the corresponding suburbs:

Array Shaping Function Example 1

I can pivot the layout with WRAPCOLS and TOROW so that the postcodes are now in a column like so:

Array Shaping Function Example 2

Or I can format it in a tabular layout with a column for the postcode and a column for the suburb with HSTACK, TOCOL and CHOOSEROWS:

Array Shaping Function Example 3

Notice how I used CHOOSEROWS to return the list of postcodes twice, hence the 1,1 in the CHOOSEROWS formula:

=HSTACK(TOCOL(CHOOSEROWS(C6:G6,1,1)),TOCOL(C7:G8))

Handling Missing Data

If there’s an uneven number of suburbs for each postcode you end up with blanks in the result:

Array Shaping Functions 4

We can filter out the blanks with the FILTER function:

Array Shaping Functions 5

FILTER checks for blanks by repeating the second array in HSTACK returned by TOCOL:

=FILTER(HSTACK(TOCOL(CHOOSEROWS(C31:G31,1,1,1,1)),TOCOL(C32:G35)), TOCOL(C32:G35)<>"")

excel shaping arrays

More Dynamic Arrays Posts

Excel LET Function

Excel LET Function

Excel LET Function allows you to declare variables and intermediate calculations inside of the formula improving readability and performance.
list_first_monday_date_in_each_month

List First Monday Date in Each Month

With the DATE and WEEKDAY functions we can easily list first Monday date in each month. With EOMONTH you can easily switch to the last Monday of each month.

Excel XLOOKUP Function

The new Excel XLOOKUP Function replaces the need for VLOOKUP, HLOOKUP, INDEX & MATCH and more. It’s available in Office 365.
Excel Hash 2019

Excel Hash 2019 – Dynamic Playoffs Table

Excel Hash Competition 2019 – dynamic playoffs table uses Icons, XOR, Dynamic Arrays and Linked Pictures to create an integrated solution.

Extract Values Present in Two Lists

Use an Excel formula to extract values present in two lists of varying sizes. Watch the video and download the Excel file with examples.
Excel Sorted Dynamic Unique List

Excel Sorted Dynamic Unique List

Excel Sorted Dynamic Unique Lists have never been so easy now that we have dynamic array formulas.
excel dynamic arrays

Excel Dynamic Arrays

The new Excel Dynamic Arrays will change the way you work with Excel formulas. As well as a host of new functions, CTRL+SHIFT+ENTER is no longer required.

More Excel Formulas Posts

ai-aided excel formula editor

AI Aided Excel Formula Editor

Save time with this free AI Excel formula editor add-in that writes, edits, improves and interprets formulas for you!
top excel functions for data analysts

Top Excel Functions for Data Analysts

Must know Excel Functions for Data Analysts and what functions you don’t have to waste time learning and why.
excel advanced formula environment

Excel Advanced Formula Environment

Excel Advanced Formula Environment is a long awaited, new improved way to write, name and store Excel formulas.
Pro Excel Formula Writing Tips

Pro Excel Formula Writing Tips

Must know Excel formula writing tips, tricks and tools to make you an Excel formula ninja, including a new formula editor.
excel shaping arrays

New Array Shaping Excel Functions

The Excel Shaping Array Functions makes it easier than ever to reshape arrays and ranges using these purpose built functions
excel nested if functions what not to do

Excel IF Formulas and What Not To Do

Excel IF formulas can get out of hand when you nest too many IFs. Not only do they become unwieldy they’re difficult for anyone to understand
excel image function

Excel IMAGE Function

The Excel IMAGE Function enables you to embed images in a cell using a formula. It supports BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP files

Excel VSTACK and HSTACK Functions

New Excel VSTACK and HSTACK functions makes combining arrays of cells easy and with some clever tricks we can extend their capabilities.
identify overlapping dates and times in excel

Identify overlapping dates and times in Excel

How to identify overlapping dates and times in Excel with a formula that checks a range of cells. Works with Dates and Times.
New Excel Text Functions

TEXTSPLIT, TEXTBEFORE and TEXTAFTER Functions

TEXTAFTER, TEXTBEFORE and TEXTSPLIT are exciting new Excel Text functions. They’re fairly self-explanatory, however TEXTSPLIT has some cool features.


Category: Excel FormulasTag: Dynamic Arrays
Previous Post:excel dashboards custom backgroundsCustom Excel Dashboard Backgrounds
Next Post:Excel Dot Map Chartsexcel dot map charts

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.