NUMBERS


Returns only numbers in a range as an array. If there is only a single number, returns the number. If none is found, returns an empty array.

Syntax:

NUMBERS(range)


range is required, and is the group of cells you want the NUMBERS function to look at.


Example:

If range, found in A1:A10, contains values 10, Dog, 0, Rain, 5, House, 2, Cloud, 1, Star:

NUMBERS(A1:A10)

returns [10, 0, 5, 2, 1]



A

B

1
10
[10,0,5,2,1]
2
Dog
 
3
0
 
4
Rain
 
5
5
 
6
House
 
7
2
 
8
Cloud
 
9
1
 
10
Star
 

Application:

Customer Order Tracking


Imagine a company that manages customer orders in a table. The "Order ID" column contains a mix of numbers (for direct phone orders) and text strings (for online orders, which include letters). The company needs to quickly get a list of just the numeric order IDs for a report on phone sales.


The NUMBERS function is the perfect tool for this job. It will look at the entire "Order ID" column and return only the entries that are numbers.


Here is the NUMBERS function in action:


The NUMBERS function has one parameter: range (the group of cells it will look at). In this example, the range is the "Order ID" column.


NUMBERS(Order ID Column)


Table: Customer Orders

Order ID

Customer Name

Status

A
B
C
1
1001
Jane Smith
Shipped
2
ABC-123
John Doe
Processing
3
1002
Alice Johnson
Shipped
4
XYZ-456
Bob Williams
Canceled
5
1003
Cathy Lee
Shipped
6
EFG-789
David Miller
Awaiting Payment
7
1004
Eva Green
Shipped

Result of the NUMBERS function:


When the NUMBERS function is applied to the "Order ID" column, it will look at each cell in the specified range and return only the numerical values.


Output:


  • If the function is in a single cell, it will return an array of numbers like this: [1001, 1002, 1003, 1004].
  • If a range only contained one number (e.g., if you only selected 1001), the function would simply return 1001.
  • If the selected range contained no numbers (e.g., if you only selected ABC-123 and XYZ-456), it would return an empty array, which might appear as a blank cell or an error depending on the software.


This example shows how the NUMBERS function serves a crucial role in data management by efficiently filtering a mixed set of data to isolate only the numerical entries, which can then be used for specific calculations or reports.

Result for NUMBERS(Order ID Column):

[1001,1002,1003,1004]



This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof