Excel 2019 Formula to Extract Numbers from Range of 6 Column, 50 Row Table

Abstract: Extract numbers from a 6x50 table in Excel 2019 using VBA or Power Query since standard formulas fail.

Created: 2026-08-21 by

To extract numbers from a 6-column, 50-row table in Excel 2019 without dynamic arrays, you must use VBA User Defined Functions or Power Query. Standard formulas like TEXTJOIN cannot process array results directly in this version. This guide provides two robust solutions: a custom VBA function for immediate cell-based extraction and Power Query for automated data transformation.

Why Standard Formulas Fail in Excel 2019

Many users attempt to use TEXTJOIN combined with IF(ISNUMBER(...)) to concatenate numeric values from a range. While this approach works in Excel 365 due to dynamic array support, it fails in Excel 2019. In Excel 2019, ISNUMBER returns an array of TRUE/FALSE values when applied to a range. The IF function then returns an array of numbers or blanks. However, TEXTJOIN in Excel 2019 expects a single range reference, not an array result, causing a #VALUE! error. Attempting to enter this as an array formula using Ctrl+Shift+Enter does not solve the issue because TEXTJOIN was introduced after the array calculation engine changes that would allow such nested array operations to pass cleanly into text concatenation functions. Therefore, we must rely on tools that can iterate through cells individually or transform the dataset structure entirely.

Solution 1: Using VBA User Defined Function

The most direct method for Excel 2019 users who need a formula-like experience is creating a custom VBA function. This function iterates through each cell in the specified range, checks if the value is numeric, and appends it to a string separated by commas. First, open your Excel workbook and press Alt + F11 to open the Visual Basic for Applications (VBA) editor. In the menu, select Insert > Module to create a new code module. Copy and paste the following code into the module window:
Function ExtractNumbers(rng As Range) As String
    Dim cell As Range
    Dim result As String
    
    For Each cell In rng
        If IsNumeric(cell.Value) And Not IsEmpty(cell.Value) Then
            ' Ensure we are dealing with actual numbers, not text representations
            If IsError(cell.Value) = False Then
                If result = "" Then
                    result = CStr(cell.Value)
                Else
                    result = result & ", " & CStr(cell.Value)
                End If
            End If
        End If
    Next cell
    
    ExtractNumbers = result
End Function
Close the VBA editor and return to your worksheet. You can now use this function just like any built-in Excel function. Assuming your data resides in cells A1:F50, enter the following formula in any empty cell: =ExtractNumbers(A1:F50) This function will scan all 300 cells in the specified range. It ignores non-numeric entries such as text strings or errors. If multiple numbers are found, they are joined together with a comma and a space. This solution is efficient for static tables and requires no external dependencies beyond the VBA environment, which is standard in Excel 2019. Note that workbooks containing macros must be saved as .xlsm to preserve the function. For more details on managing table structures in Office applications, see Word 365: Calculating Relative Row Values in Tables.

Solution 2: Using Power Query

If you prefer not to use VBA or require a solution that updates automatically when the source data changes, Power Query is the ideal alternative. Excel 2019 includes Power Query natively under the Data tab. Start by selecting your entire table range (A1:F50). Go to the Data tab on the ribbon and click From Table/Range. If prompted, confirm that your table has headers. This opens the Power Query Editor. In the Power Query Editor, you need to unpivot the columns so that all values are in a single column. Select all six data columns by clicking the first column header, holding Shift, and clicking the last. Right-click one of the selected headers and choose Unpivot Columns. This transforms the wide table into a long format with two columns: Attribute (original column name) and Value. Next, filter out the non-numeric values. Click the dropdown arrow on the Value column header. Uncheck the box for Type if it exists, or simply ensure that only numeric types remain. If your data contains mixed types, you may need to add a custom column to check for numbers, but typically, unpivoting allows you to filter by data type easily. Remove rows where the Value is null or text. Finally, go to the Home tab and click Close & Load. This loads the cleaned, numeric-only data back into Excel as a new table. You can then use simple aggregation functions like SUM or AVERAGE on this clean list. This method is particularly useful if you need to perform further analysis on the extracted numbers rather than just listing them. See also Creating a Formula on Excel for My Table for additional context on handling structured references.

Performance Considerations

When using the VBA function on large datasets, note that iterating through 300 cells is generally instantaneous. However, if you expand the range significantly or have thousands of such calls, performance may degrade. In such cases, Power Query is superior because it processes data in memory during the load phase rather than recalculating every time the sheet changes. Additionally, Power Query handles errors and missing data more gracefully than a basic VBA loop, which might crash if it encounters unexpected object types. Always test your chosen method with a small subset of your data first. Verify that the output matches your expectations regarding number formatting and delimiter choices. If you need to extract specific patterns of numbers, such as integers only or decimals up to two places, adjust the VBA logic accordingly or use Power Query's rounding features.

Frequently Asked Questions

Can I use ARRAYFORMULA in Excel 2019?

No, ARRAYFORMULA is a Google Sheets function and does not exist in Excel. Excel uses implicit intersection and legacy array entry methods (Ctrl+Shift+Enter) instead. For complex array operations in Excel 2019, VBA or Power Query is required.

How do I handle negative numbers with these methods?

Both the VBA function and Power Query correctly identify negative numbers as numeric values. The VBA function will include the minus sign in the concatenated string. In Power Query, negative numbers are treated as valid numeric types and will appear in the final output table.

What if my table has merged cells?

Power Query cannot read merged cells reliably. You should unmerge cells before importing data into Power Query. Similarly, the VBA function may skip merged cells depending on how Excel exposes their underlying values, so ensure your data range consists of individual, unmerged cells for accurate extraction.

Is there a way to do this without VBA or Power Query?

You can manually copy the data to a helper column and use the VALUE() function wrapped in an IF(ISNUMBER(...)) check, but this requires manual iteration or helper columns for each row. There is no single native Excel 2019 formula that can extract and concatenate numbers from a multi-column range dynamically.

Does this work for currency formatted cells?

Yes. Cells formatted as Currency still contain numeric underlying values. The VBA function's IsNumeric check will return True for currency values, and they will be extracted. Power Query will also recognize them as numeric types during the filtering step.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More