Return value
A logical value (TRUE or FALSE)
Usage notes
The ISNUMBER function returns TRUE when a cell contains a number, and FALSE if not. You can use ISNUMBER to check that a cell contains a numeric value, or that the result of another function is a number.
The ISNUMBER function takes one argument, value, which can be a cell reference, a formula, or a hardcoded value. Typically, value is entered as a cell reference like A1. When value is a number, the ISNUMBER function will return TRUE. Otherwise, ISNUMBER will return FALSE.
Examples
The ISNUMBER function returns TRUE if value is numeric:
=ISNUMBER("apple") // returns FALSE
=ISNUMBER(100) // returns TRUE
If cell A1 contains the number 100, ISNUMBER returns TRUE:
=ISNUMBER(A1) // returns TRUE
If a cell contains a formula, ISNUMBER checks the result of the formula:
=ISNUMBER(2+2) // returns TRUE
=ISNUMBER(2^3) // returns TRUE
=ISNUMBER(10 &" apples") // returns FALSE
Note: the ampersand (&) is the concatenation operator in Excel. When values are concatenated, the result is text.
Count numeric values
To count cells in a range that contain numbers, you can use the SUMPRODUCT function like this:
=SUMPRODUCT(--ISNUMBER(range))
The double negative coerces the TRUE and FALSE results from ISNUMBER into 1s and 0s and SUMPRODUCT sums the result.
Notes
- ISNUMBER will return TRUE for Excel dates and times since they are numeric.
- ISNUMBER will return FALSE for empty cells and errors.
ISNUMBER Function in Excel
ISNUMBER function in excel is an information function that checks if the referred cell value is numeric or non-numeric. Its output is a boolean value (“True,” if the “value” parameter is numeric or “False” if the “value” parameter is non-numeric)
Syntax
The ISNUMBER formula is stated as follows:
The ISNUMBER formula has only one parameter, the “value.”
- Value: It is a flexible parameter. It can be another function or formula, a cell, or value that needs testing if it is numeric or not.
The ISNUMBER formula returns the following logical values:
- “True,” if the “value” parameter is numeric.
- “False,” if the “value” parameter is non-numeric.
The formula is represented in the following format.
“=ISNUMBER(Reference Cell)”
The argument “reference cell” refers to the cell which we want to check or identify.
Let us consider the following ISNUMBER formula.
“=ISNUMBER(T1XT)”
The output is “false,” as the argument T1XT does not have numbers in it.
Table of contents
- ISNUMBER Function in Excel
- Syntax
- Characteristics of ISNUMBER Function
- How to Use the ISNUMBER Function in Excel?
- How to use Excel ISNUMBER Function and the SEARCH Function?
- Frequently Asked Questions (FAQs)
- ISNUMBER in Excel Video
- Recommended Articles
Characteristics of ISNUMBER Function
- It returns a Boolean value (“true” or “false”).
- It finds its usage as a worksheet (WS) function.
- It is a part of IS functions group of Excel.
How to Use the ISNUMBER Function in Excel?
Let us understand the uses of this function with few examples of actual data.
You can download this ISNUMBER Function Excel Template here – ISNUMBER Function Excel Template
Let us enter a few values given in the table below and test the behavior of the ISNUMBER function.
How to use Excel ISNUMBER Function and the SEARCH Function?
The ISNUMBER function, together with the SEARCH function, checks if a cell contains a specific sub-string among the text string.
SEARCH function in ExcelSearch function gives the position of a substring in a given string when we give a parameter of the position to search from. As a result, this formula requires three arguments. The first is the substring, the second is the string itself, and the last is the position to start the search.read more will return the position (or index) of a specified substring within a text string. It belongs to the Excel TEXT functions category. It allows running a case-insensitive search on text and supports the usage of wild cards.
We will understand how the ISNUMBER function works together with the SEARCH function in the following example.
Let us use other functions (e.g., SEARCH function) as parameters for the ISNUMBER function and test its behavior (as shown in the table below).
Consider the ISNUMBER formula mentioned in the table,
“=ISNUMBER(SEARCH(B14,A14))”
Now, we will observe how this formula works,
- At first, the SEARCH function looks for the substring “Excel” (B14) in the specified cell (A14). It returns the position of the substring as 12. If the substring is not found, it returns an error value (#VALUE).
- Then, the ISNUMBER function checks whether the SEARCH function returns a numeric value; if yes, the output is “true.” If the SEARCH shows an error value (non-numeric), then ISNUMBER returns “false.”
Frequently Asked Questions (FAQs)
What is the Excel ISNUMBER function?
The ISNUMBER function checks if a cell contains a number or not. It returns “true” if the value is numeric, and if not, it returns a “false.”
How to use ISNUMBER in Excel?
We use the ISNUMBER function to test if a value is a number. It will return “true” when the value is numeric and “false” when non-numeric.
Let us consider the syntax “=ISNUMBER(G1).” It returns “true” if the argument “G1” contains a number or a formula that returns a numeric value. It returns “false” if the argument “G1” contains the text.
How do ISNUMBER and ISTEXT functions differ?
The ISNUMBER function helps to check whether a value in a cell or a value resulting from another formula is a number. The output of ISNUMBER is either “true” or “false.”
The ISTEXT function checks whether a value is a text or not. The result of this function is also either “true” or “false.” Moreover, using this function, you can find if a value in a cell is a numeric value entered as text.
• The ISNUMBER function is an information function used to find if the cell value in reference is a numerical value or not. It returns values as “true” or “false.”
• The formula for the ISNUMBER function is “=ISNUMBER (value).”
• It is a worksheet (WS) function in Excel.
• It is a Boolean function of Excel which gives the output as “true” or “false.”
• The ISNUMBER function along with the Excel SEARCH function, checks if a cell contains a specific text among the content of the cell.
ISNUMBER in Excel Video
Recommended Articles
This is a guide to the ISNUMBER function in Excel. In this article, we have discussed how to use this function along with step-by-step examples and a downloadable template. You may also look at the below useful functions in Excel –
- Excel Auto NumberThere are two approaches for auto numbering. To begin, fill the first two cells with the series you wish to insert and drag it to the table’s end. Second, use the =ROW() formula to get the number, and then drag it to the table’s end.read more
- Numbering in ExcelNumbering in excel means providing a cell with numbers which are like serial numbers to some table, obviously it can also be done manually by filling first two cells with numbers and drag down to the end to table which excels will automatically fill the series.read more
- MAX in ExcelThe MAX Formula in Excel is used to calculate the maximum value from a set of data/array. It counts numbers but ignores empty cells, text, the logical values TRUE and FALSE, and text values.read more
- SUMPRODUCT Function in ExcelThe SUMPRODUCT excel function multiplies the numbers of two or more arrays and sums up the resulting products.read more
- Excel Shortcut Paste ValuesPasting values is a common procedure that allows us to eliminate any formatting and formulas from the copied cell and paste them into the pasted cell. «Alt + E + S + V» is the shortcut key for pasting values.read more
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel Web App Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
Description
Each of these functions, referred to collectively as the IS functions, checks the specified value and returns TRUE or FALSE depending on the outcome. For example, the ISBLANK function returns the logical value TRUE if the value argument is a reference to an empty cell; otherwise it returns FALSE.
You can use an IS function to get information about a value before performing a calculation or other action with it. For example, you can use the ISERROR function in conjunction with the IF function to perform a different action if an error occurs:
=
IF(
ISERROR(A1), «An error occurred.», A1 * 2)
This formula checks to see if an error condition exists in A1. If so, the IF function returns the message «An error occurred.» If no error exists, the IF function performs the calculation A1*2.
Syntax
ISBLANK(value)
ISERR(value)
ISERROR(value)
ISLOGICAL(value)
ISNA(value)
ISNONTEXT(value)
ISNUMBER(value)
ISREF(value)
ISTEXT(value)
The IS function syntax has the following argument:
-
value Required. The value that you want tested. The value argument can be a blank (empty cell), error, logical value, text, number, or reference value, or a name referring to any of these.
Function |
Returns TRUE if |
ISBLANK |
Value refers to an empty cell. |
ISERR |
Value refers to any error value except #N/A. |
ISERROR |
Value refers to any error value (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!). |
ISLOGICAL |
Value refers to a logical value. |
ISNA |
Value refers to the #N/A (value not available) error value. |
ISNONTEXT |
Value refers to any item that is not text. (Note that this function returns TRUE if the value refers to a blank cell.) |
ISNUMBER |
Value refers to a number. |
ISREF |
Value refers to a reference. |
ISTEXT |
Value refers to text. |
Remarks
-
The value arguments of the IS functions are not converted. Any numeric values that are enclosed in double quotation marks are treated as text. For example, in most other functions where a number is required, the text value «19» is converted to the number 19. However, in the formula ISNUMBER(«19»), «19» is not converted from a text value to a number value, and the ISNUMBER function returns FALSE.
-
The IS functions are useful in formulas for testing the outcome of a calculation. When combined with the IF function, these functions provide a method for locating errors in formulas (see the following examples).
Examples
Example 1
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Formula |
Description |
Result |
=ISLOGICAL(TRUE) |
Checks whether TRUE is a logical value |
TRUE |
=ISLOGICAL(«TRUE») |
Checks whether «TRUE» is a logical value |
FALSE |
=ISNUMBER(4) |
Checks whether 4 is a number |
TRUE |
=ISREF(G8) |
Checks whether G8 is a valid reference |
TRUE |
=ISREF(XYZ1) |
Checks whether XYZ1 is a valid reference |
FALSE |
Example 2
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Data |
||
Gold |
||
Region1 |
||
#REF! |
||
330.92 |
||
#N/A |
||
Formula |
Description |
Result |
=ISBLANK(A2) |
Checks whether cell A2 is blank. |
FALSE |
=ISERROR(A4) |
Checks whether the value in cell A4, #REF!, is an error. |
TRUE |
=ISNA(A4) |
Checks whether the value in cell A4, #REF!, is the #N/A error. |
FALSE |
=ISNA(A6) |
Checks whether the value in cell A6, #N/A, is the #N/A error. |
TRUE |
=ISERR(A6) |
Checks whether the value in cell A6, #N/A, is an error. |
FALSE |
=ISNUMBER(A5) |
Checks whether the value in cell A5, 330.92, is a number. |
TRUE |
=ISTEXT(A3) |
Checks whether the value in cell A3, Region1, is text. |
TRUE |
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
-
#1
Hi,
I have a cell that totals the values on a sheet gathered by other formulas. If values aren’t yet present they’ll obviously display #VALUE! as they don’t result in a number.
I need a way to say (for example) in a formula:
If a given cell doesn’t equal an actual number and so reports an error, display nothing.
OR incorrectly =IF(A1=»#VALUE!»,»»,A1)
Hopefully this makes sense.
Any help appreciated
Cheers
Bob
Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
-
#2
Re: How do I — Logical Test: If a cell’s value is not a numb
What formula are you using that results in #VALUE! errors?
DRJ
MrExcel MVP
-
#3
Hi — Welcome to the board
=IF(ISERROR(A1),»»,A1)
-
#4
Re: How do I — Logical Test: If a cell’s value is not a numb
Try
=IF(ISERROR(your formula),»»)
Nimo
-
#5
Re: How do I — Logical Test: If a cell’s value is not a numb
Thanks loads for a solved query and a speedy and friendly welcome to the board.
That has completely sorted it. Plus I’ve just discovered the numerous IS functions that will help me in other similar circumstances.
Typically, Excel’s own «Answer Wizard» failed to offer an answer despite rephrasing the query numerous times
Thanks
Bobwhosmiles (again)
DRJ
MrExcel MVP
-
#6
Your’re Welcome
Take Care
-
#7
Re: How do I — Logical Test: If a cell’s value is not a numb
=IF(ISNUMBER(a1),a1,»»)
-
#8
Re: How do I — Logical Test: If a cell’s value is not a numb
bobwhosmiles said:
…That has completely sorted it. Plus I’ve just discovered the numerous IS functions that will help me in other similar circumstances.
I guess it won’t help saying that an IsError test is most of the time not the way to resolve the problem.
Typically, Excel’s own «Answer Wizard» failed to offer an answer despite rephrasing the query numerous times…
Maybe it doesn’t like invoking IsError…
-
#9
Re: How do I — Logical Test: If a cell’s value is not a numb
Hi Aladin,
What would you have suggested?
Nimo (still learning)
ISNUMBER Function (Table of Contents).
- ISNUMBER in Excel
- ISNUMBER Formula in Excel
- How to Use ISNUMBER Function in Excel?
IsNumber is another Boolean type of function in excel which gives the output in TRUE and FALSE only. IsNumber function in excel is used to find whether a cell contains a numerical value or a number. If any cell contains a number stating from 0 to any digit, then IsNumber will return TRUE there or else for other than the number, it will return FALSE.
Uses of ISNUMBER Function
ISNUMBER Function returns TRUE if a cell contains a number; otherwise, it returns FALSE. If a cell contains a TEXT, the function will return a FALSE. A cell contains a number or not, or if we want to check the result of any function is number, in these scenarios, we use ISNUMBER Function.
ISNUMBER Formula in Excel
Below is the ISNUMBER Formula in Excel :
Where the passing argument is:
- Value – The value which you want to check.
Note:
- The ISNUMBER function returns TRUE if a value is a valid number.
- The ISNUMBER function returns FALSE if the value is not a valid number like text, date, time, etc.
As a Worksheet function, it can be entered as a part of a formula in a cell. Thus, it can be used as below screenshot:
Where is it Found in Excel?
ISNUMBER Function is a built-in function in excel; hence it is found under the FORMULAS tab in excel. Please follow the below steps:
- Click on the FORMULAS tab.
- Select the More Functions option.
- It will open a drop-down list of functions category. Click on the Information tab.
- After clicking on the Information tab, it will again open a drop-down list of functions. Click on the ISNUMBER function.
- It will open a dialog box for Function arguments.
- Enter the Value field with the value, which you want to check.
How to Use ISNUMBER Function in Excel?
This function is very simple and easy compared to other functions in Microsoft Excel, which contains lots of arguments or parameters.
You can download this ISNUMBER Function Excel Template here – ISNUMBER Function Excel Template
Example #1
We have given the below data.
Now we will apply the ISNUMBER function on the above data:
The Result will be :
Drag & drop this formula for the rest data, and the final result is shown below:
Explanation:
- If the supplied argument or value is a number, the ISNUMBER function will return TRUE. Like for value = 150, ISNUMBER(150) will return TRUE.
- If the value is text, character, sentence, special character, or any value other than a number, the ISNUMBER function will return FALSE. Like for Value = “$”, ISNUMBER($) will return FALSE.
Example #2
Let’s take some mathematical expression:
Now we will apply the ISNUMBER Function on the above expressions to check that the result of these expressions is numeric or not.
The Result will be :
Apply the same rule for the rest values, and the final result is shown below:
Explanation:
- The supplied value is the mathematical expression; hence the ISNUMBER function return as TRUE.
Things to Remember
- If the supplied value is Excel date and time, the ISNUMBER function will return TRUE because they are numeric.
- If a value is text or supplied number is entered as text, the ISNUMBER function will return FALSE.
- Where there is a large amount of data, the ISNUMBER is very helpful. It helps in testing if the result of any function is a number or not.
- The ISNUMBER function is a part of IS Functions that return TRUE or FALSE.
- This function will never return any error value like #NAME!, #N/A! etc.
Recommended Articles
This has been a guide to ISNUMBER Function in Excel. Here we discuss the ISNUMBER Formula in Excel and How to use the ISNUMBER function in Excel and practical examples and downloadable excel templates. You can also go through our other suggested articles –
- Excel ISNUMBER Formula
- Negative Numbers in Excel
- Excel COLUMN to Number
- VBA Format Number
How to Use the Excel Functions ISNUMBER, ISTEXT and ISNONTEXT
IS functions are really fun to work with. They’ll return Boolean values (TRUE or FALSE) but can prove super useful when used the right way.
The ISNUMBER and ISTEXT function belong to the same IS family of Excel.
What are these functions used for, and how do you use them? Let’s learn all this and more in the guide below 😀
Also, if you want to practice these functions in real time, download our sample workbook here.
How to use ISNUMBER in Excel
The Excel ISNUMBER function lies in the category of information functions. Its syntax is pretty simple and easy to use.
ISNUMBER checks a cell to see if the given value is a number. The value could be a simple number or the result of a formula.
It returns TRUE or FALSE and is often used in combination with other formulas. Let’s see the syntax below.
=ISNUMBER(value)
The ISNUMBER syntax only uses a single argument – value.
The value argument is the value we want to check. It can be a formula, cell reference, number, or anything else 🔟
To see how the ISNUMBER function works, read on.
We will apply the formula to the following data set.
Here’s the result the ISNUMBER function returns.
As evident, column A contains the values to be checked. Column B contains the results of the function and column C shows the formula used.
Column B returns TRUE for all numerical values and FALSE for all text strings.
Note that the ISNUMBER function returns FALSE for the number #854. That’s because it is not a number. The value is left aligned by default, indicating that it is not a number but stored as text instead.
ISNUMBER and IF formula example
Let’s see an example of the ISNUMBER and IF function 🤓
We have the following example data.
We want to find the salary of an employee in row 6 in the given data set.
But we want to keep the data private. To do that, we have used the IF function that will return the salary amount only if we use ID No.
If anyone tries to find the salary using names, the function will return an empty cell value.
The ISNUMBER function becomes important here as it checks if the given cell value is a number. If the selected cell is not a number, it will return a blank cell.
Let’s see this in action now, shall we? 👀
- Select a cell.
- Apply the formula as:
=IF(
- Add the ISNUMBER formula and cell value to check.
=IF(ISNUMBER(A6)
- Enter the value_if_true and value_if_false arguments as:
=IF(ISNUMBER(A6), C6, ” “)
- Press Enter.
And tada! Excel returns the expected result.
That’s because cell A6 contains a number, and we get the score corresponding to that ID No.
If we had used a cell reference containing a text string, for instance, cell B6, the function would return a blank cell. See the image below for reference.
As expected, we get an empty cell because cell B6 contains a text string.
Pretty simple, no? 😉
ISNUMBER SEARCH formula example
The SEARCH function looks up a cell for a specific substring. It returns the location of the value, but when compared with ISNUMBER, it returns the answer as TRUE or FALSE.
Let’s see an example of using the ISNUMBER and SEARCH functions together.
We have the following sample data.
Say we want to see if Roll No. 20 exists in cell B5. To do that:
- Select a cell.
- Enter the formula as:
=ISNUMBER(
- Add the SEARCH function.
=ISNUMBER(SEARCH(
- Enter the Roll No. and row you want to look for its location.
=ISNUMBER(SEARCH(20, B5)
- Press Enter.
Excel returns the result as TRUE.
Note that if we had used the SEARCH function alone, it would have returned a value “1”. But since we used it in combination with the ISNUMBER function, it returned TRUE.
That’s because the value is a number and exists in a specified location. If any of these conditions had not been fulfilled, Excel would have returned FALSE.
How to use ISTEXT in Excel
The ISTEXT function is similar to ISNUMBER. They have the same syntax arguments and perform the same kind of operation.
The only difference is that the ISTEXT function checks a cell for a text value, as evident from the name. It returns TRUE for text strings and FALSE for numeric values.
Its syntax is as follows:
=ISTEXT(value)
where value is the value to be checked.
We will use the previously used example data for the ISTEXT function.
Upon applying the ISTEXT function, we get the results:
The ISTEXT function returns TRUE for text values and FALSE for numbers.
Note that ISTEXT returns TRUE for the value #854. This proves that it is a text value as seen in the earlier ISNNUMBER example.
ISTEXT and IF formula example
Let’s see an example of the ISTEXT function with IF.
We will use the following example data.
We want to find the salary of Peter, but we don’t want to use his ID No. 😕
To do that, we will use the ISTEXT function, which will only show the salary when we enter his name. If anyone tries to check the salary using his ID No., it will return a blank cell.
Let’s see how to do it below.
- Select a cell.
- Enter the formula as:
=IF(
- Enter the ISTEXT function.
=IF(ISTEXT(
- Add the arguments for ISTEXT and IF functions.
=IF(ISTEXT(B7, C7, ” “)
- Press Enter.
Excel returns the result as:
If the cell reference used in ISTEXT function contained a number, the result would have been something like this:
As visible, the ISTEXT function returns a blank cell because cell A7 is not a text string.
How to use ISNONTEXT
The ISNONTEXT and ISNUMBER functions are identical. Both have the same purpose and the same syntax.
The ISNONTEXT function returns TRUE when a cell contains a numerical value. If it is a text string, it will return FALSE – same as in the case of ISNUMBER.
Syntax of the ISNONTEXT function is:
=ISNONTEXT(value)
Where value refers to the value to be checked.
It’s that simple to use.
A couple of tries are all you need to master this function 🧐
That’s it – Now what?
In this article, we learned how to use the ISNUMBER and ISTEXT functions. We also saw how to use the ISNONTEXT function and its uses in the practical world.
These functions are easy to learn and use. But identifying the utility of ISNUMBER and ISTEXT can be slightly difficult on the surface.
The power of these functions is unleashed when they are combined with other functions. You’ve already seen a quick glance through our examples. A little practice can help you master these functions in no time.
Some common functions you can combine the ISNUMBER and ISTEXT functions with include VLOOKUP, IF, SUMIF and others.
You can learn them in my 30-minute free email course that teaches these functions and more. It’s delivered right to your inbox only at the cost of your email address. So join now! 🤗
Frequently asked questions
The ISNUMBER function in Excel is used to check whether a given value is a number or text. If the value in a cell is a numerical value, it returns TRUE. And if it is text, it returns FALSE. It is usually used in combination with other functions like IF and VLOOKUP, etc.
The Excel ISTEXT function checks whether a certain value is a text or a number. It returns TRUE if the value is a text string and FALSE if it is a number. The ISTEXT function is easy to use and is used with other functions.
Kasper Langmann2023-02-23T14:53:33+00:00
Page load link
I have to find out if my cells text is a numeric value and wanted to use an elegant non VBA method that doesn’t impede on its current state or value.
What I’ve found is that the ISNUMBER()
function only works if the cells are number formatting or has no spaces if text formatting e.g.:
For the first three I’ve used =ISNUMBER(...)
and my last attempt is =ISNUMBER(TRIM(...))
.
The only method I’ve used that doesn’t use VBA is to override my current values using text to columns then use the =ISNUMBER()
function.
Note: I am proficient with VBA and Excel and understand I could create a user-defined function. But I don’t want to as this imposes a macro required workbook or an add-in to be installed, which I can and have done in some cases.
I will appreciate any advice, thoughts (even if they tell me it can’t be done) or VBA solutions (won’t be marked as answer however).
asked Apr 30, 2013 at 1:05
5
Try multiplying the cell value by 1, and then running the IsNumber
and Trim
functions, e.g.,:
=IsNumber(Trim(A1)*1)
answered Apr 30, 2013 at 1:10
3
Assuming the value you want to convert is in A1 you can use the following formula:
=ISNUMBER(VALUE(TRIM(CLEAN(A1)))
Here the functions clean and trim are removing whitespace and none printable characters. The function value converts a string to a number, and with the converted string we can check if the value is a number.
answered Apr 30, 2013 at 2:02
1
The shortest answer I’ve got to my question is:
=N(-A1)
Thanks brettdj
answered Apr 30, 2013 at 12:03
glhglh
5131 gold badge4 silver badges12 bronze badges
I know this post is old but I found this very useful in this case
I had a formula that returned (333), even though it is a number and ISNUMBER will say it is a number even though I did not want an answer if it had characters other than digits. The following worked for me.
=IF(AND(ISNUMBER(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))),"Is Number","")
It works if there is ANY characters other than digits. If you just want a true false drop the IF
=AND(ISNUMBER(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))
As David Zemens stated
=IsNumber(Trim(A1)*1)
Works but if there is a «-» or the number is in parentheses it will say it is a number.
I hope this helps you or others.
answered Apr 8, 2016 at 18:14
MouthpearMouthpear
511 silver badge5 bronze badges
if anyone needs to filter cells that contain anything that is not numeric:
=AND(SUMPRODUCT(--ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))=LEN(A1),A1<>"")
decimals and negatives result FALSE
answered Oct 6, 2017 at 7:58
I’m pretty late to the party, but, possibly the easiest, or shortest genuine test (note that the N
function converts the number) is =ISNUMBER(--A1)
.
Using the examples you posted above…
As with a lot of Excel shortcuts, the ‘—‘ forces Excel to assume the value afterward is a number, then all spaces are ignored. It’s as if you had typed --123
directly into a box (— obviously gives a positive number).
The third example also shows that other textual values in the string don’t simply cause an error output for ISNUMBER
.
Number | ISNUMBER() | Format | Comments |
---|---|---|---|
123456 |
TRUE | Numeric | Plain number |
123456 |
TRUE | Text | Number as text |
123456A |
FALSE | Text | Number with ‘A’ tagged on the end |
123456 |
TRUE | Text | Number prefixed with four spaces |
answered Mar 11, 2022 at 16:48
PaulPaul
1239 bronze badges