banner



How To Find Numerical Value

The tutorial explains what ISNUMBER in Excel is and provides examples of bones and avant-garde uses.

The concept of the ISNUMBER role in Excel is very elementary - it simply checks whether a given value is a number or not. An important indicate here is that the applied uses of the part go far beyond its basic concept, peculiarly when combined with other functions within larger formulas.

  • Excel ISNUMBER function
  • How to apply ISNUMBER in Excel - formula examples
  • ISNUMBER to highlight cells that contain certain text

Excel ISNUMBER office

The ISNUMBER function in Excel checks if a cell contains a numerical value or not. It belongs to the group of IS functions.

The function is available in all versions of Excel for Function 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007 and lower.

The ISNUMBER syntax requires simply i statement:

=ISNUMBER(value)

Where value is the value you want to test. Usually, information technology is represented by a prison cell reference, just y'all can also supply a real value or nest another function inside ISNUMBER to check the effect.

If value is numeric, the function returns TRUE. For anything else (text values, errors, blanks) ISNUMBER returns False.

As an case, permit's exam values in cells A2 through A6, and we volition find out that the first iii values are numbers and the last 2 are text:
ISNUMBER function in Excel

2 things you should know virtually ISNUMBER function in Excel

There are a couple of interesting points to note here:

  • In internal Excel representation, dates and times are numeric values, and so the ISNUMBER formula returns True for them (delight run into B3 and B4 in the screenshot above).
  • For numbers stored every bit text, the ISNUMBER part returns FALSE (see this example).

Excel ISNUMBER formula examples

The beneath examples demonstrate a few common and a couple of non-trivial uses of ISNUMBER in Excel.

Check if a value is number

When y'all take a bunch of values in your worksheet and you want to know which ones are numbers, ISNUMBER is the right function to use.

In this example, the first value is in A2, then we use the below formula to check it, and and then drag down the formula to as many cells as needed:

=ISNUMBER(A2)
Checking if a value is number

Please pay attention that although all the values look like numbers, the ISNUMBER formula has returned False for cells A4 and A5, which means those values are numeric strings, i.east. numbers formatted as text. There may exist dissimilar reasons for this, for example leading zeros, preceding apostrophe, etc. Any the reason, Excel does not recognize such values as numbers. So, if your values do not calculate correctly, the beginning thing for you to check is whether they are really numbers in terms of Excel, so convert text to number if needed.

Autonomously from identifying numbers, the Excel ISNUMBER part can also check if a cell contains specific text every bit part of the content. For this, use ISNUMBER together with the SEARCH function.

In the generic grade, the formula looks as follows:

ISNUMBER(SEARCH(substring, cell))

Where substring is the text that you want to notice.

Equally an example, let'due south check whether the string in A3 contains a specific colour, say red:

=ISNUMBER(SEARCH("ruddy", A3))

This formula works nicely for a unmarried prison cell. Simply because our sample tabular array (please see below) contains three different colors, writing a separate formula for each one would be the waste of time. Instead, we will refer to the prison cell containing the color of involvement (B2).

=ISNUMBER(SEARCH(B$ii, $A3))

For the formula to correctly copy down and to the right, be sure to lock the following coordinates with the $ sign:

  • In substring reference, lock the row (B$ii) then that the copied formulas always choice the substrings in row ii. The column reference is relative considering nosotros want it to adjust for each cavalcade, i.e. when the formula is copied to C3, the substring reference will change to C$two.
  • In the source cell reference, lock the column ($A3) then that all the formulas cheque the values in cavalcade A.

The screenshot beneath shows the result:
Using ISNUMBER SEARCH formula in Excel

ISNUMBER FIND - case-sensitive formula

As the SEARCH function is example-insensitive, the above formula does not differentiate uppercase and lowercase characters. If yous are looking for a example-sensitive formula, apply the FIND role rather than SEARCH.

ISNUMBER(FIND(substring, cell))

For our sample dataset, the formula would have this form:

=ISNUMBER(FIND(B$two, $A3))

How this formula works

The formula's logic is quite obvious and easy to follow:

  • The SEARCH / Notice function looks for the substring in the specified cell. If the substring is found, the position of the beginning graphic symbol is returned. If the substring is not establish, the function produces a #VALUE! error.
  • The ISNUMBER part takes it from there and processes numeric positions. So, if the substring is plant and its position is returned every bit a number, ISNUMBER outputs Truthful. If the substring is not establish and a #VALUE! error occurs, ISNUMBER outputs Faux.

IF ISNUMBER formula

If you lot aim to get a formula that outputs something other than TRUE or Faux, use ISNUMBER together with the IF function.

Example one. Cell contains which text

Taking the previous example further, suppose you want to mark the color of each item with "x" like shown in the table below.

To have this done, simply wrap the ISNUMBER SEARCH formula into the IF statement:

=IF(ISNUMBER(SEARCH(B$ii, $A3)), "x", "")

If ISNUMBER returns Truthful, the IF role outputs "x" (or whatever other value y'all supply to the value_if_true argument). If ISNUMBER returns FALSE, the IF function outputs an empty string ("").
IF ISNUMBER formula to identify which text a cell contains

Example two. Kickoff character in a cell is number or text

Imagine that y'all are working with a listing of alphanumeric strings and yous want to know whether a string'south first character is a number or letter.

To build such a formula, we you'll need 4 dissimilar functions:

  • The LEFT function extracts the first character from the start of a string, say in cell A2:

    LEFT(A2, 1)

  • Considering LEFT belongs to the category of Text functions, its outcome is e'er a text string, even if it only contains numbers. Therefore, before checking the extracted graphic symbol, we need to try to convert it to a number. For this, utilise either the VALUE part or double unary operator:

    VALUE(LEFT(A2, 1)) or (--LEFT(A2, 1))

  • The ISNUMBER role determines if the extracted graphic symbol is numeric or not:

    ISNUMBER(VALUE(LEFT(A2, i)))

  • Based on the ISNUMBER consequence (True or Faux), the IF office returns "Number" or "Alphabetic character", respectively.

Bold nosotros are testing a string in A2, the complete formula takes this shape:

=IF(ISNUMBER(VALUE(LEFT(A2, one))), "Number", "Letter")

or

=IF(ISNUMBER(--LEFT(A2, one)), "Number", "Letter")
IF ISNUMBER formula to check if the first character is number or letter

The ISNUMBER role likewise comes in handy for extracting numbers from a string. Here'due south an example: Go number from any position in a string.

Check if a value is not number

Though Microsoft Excel has a special function, ISNONTEXT, to determine whether a prison cell'south value is not text, an analogous role for numbers is missing.

An easy solution is to use ISNUMBER in combination with Non that returns the contrary of a logical value. In other words, when ISNUMBER returns Truthful, Not converts it to FALSE, and the other way round.

To run across it in activity, please find the results of the following formula:

=Not(ISNUMBER(A2))
Checking if a value is not number

Some other approach is using the IF and ISNUMBER functions together:

=IF(ISNUMBER(A2), "", "Non number")

If A2 is numeric, the formula returns cipher (an empty string). If A2 is non numeric, the formula says information technology upfront: "Not number".
IF ISNUMBER formula to check if a value is not number

If y'all'd like to perform some calculations with numbers, then put an equation or another formula in the value_if_true statement instead of an empty string. For example, the below formula will multiply numbers by 10 and yield "Not number" for non-numeric values:

=IF(ISNUMBER(A2), A2*x, "Not number")

Check if a range contains whatever number

In situation when you want to test the whole range for numbers, apply the ISNUMBER role in combination with SUMPRODUCT like this:

SUMPRODUCT(--ISNUMBER(range))>0

SUMPRODUCT(ISNUMBER(range)*1)>0

For example, to observe out if the range A2:A5 contains any numeric value, the formulas would get as follows:

=SUMPRODUCT(--ISNUMBER(A2:A5))>0

=SUMPRODUCT(ISNUMBER(A2:A5)*ane)>0
Checking if a range contains any number

If you'd like to output "Yes" and "No" instead of Truthful and Simulated, utilise the IF statement as a "wrapper" for the above formulas. For example:

=IF(SUMPRODUCT(--ISNUMBER(A2:A5))>0, "Yes", "No")
Advanced formula to check if a range contains any number

How this formula works

At the heart of the formula, the ISNUMBER function evaluates each cell of the specified range, say B2:B5, and returns TRUE for numbers, FALSE for anything else. As the range contains 4 cells, the assortment has 4 elements:

{TRUE;FALSE;False;FALSE}

The multiplication operation or the double unary (--) coerces True and FALSE into 1'due south and 0'south, respectively:

{one;0;0;0}

The SUMPRODUCT function adds upward the elements of the assortment. If the outcome is greater than zero, that means there is at least one number the range. So, you use ">0" to go a terminal result of TRUE or Simulated.

ISNUMBER in conditional formatting to highlight cells that comprise certain text

If you are looking to highlight cells or entire rows that comprise specific text, create a conditional formatting rule based on the ISNUMBER SEARCH (case-insensitive) or ISNUMBER FIND (case-sensitive) formula.

For this example, we are going to highlight rows based on the value in cavalcade A. More precisely, we volition highlight the items that contain the word "scarlet". Hither'due south how:

  1. Select all the data rows (A2:C6 in this example) or merely the column in which you want to highlight cells.
  2. On the Home tab, in the Styles group, click New Rule > Use a formula to decide which cells to format.
  3. In the Format values where this formula is truthful box, enter the below formula (delight observe that the column coordinate is locked with the $ sign):

    =ISNUMBER(SEARCH("scarlet", $A2))

  4. Click the Format push and choose the format you desire.
  5. Click OK twice.

If you take trivial experience with Excel conditional formatting, you tin find the detailed steps with screenshots in this tutorial: How to create a formula-based conditional formatting rule.

As the result, all the items of the scarlet color are highlighted:
Using ISNUMBER in conditional formatting to highlight cells that contain specific text

Instead of "hardcoding" the colour in the conditional formatting dominion, yous can type it in a predefined cell, say E2, and refer to that jail cell in your formula (please mind the absolute cell reference $E$2). Additionally, you need to check if the input jail cell is not empty:

=AND(ISNUMBER(SEARCH($Due east$2, $A2)), $Due east$ii<>"")

As the result, yous volition get a more flexible rule that highlights rows based on your input in E2:
Using ISNUMBER to highlight rows based on a cell value

That'southward how to use the ISNUMBER function in Excel. I thank you for reading and hope to run across you lot on our web log side by side calendar week!

Available downloads

Excel ISNUMBER formula examples

You may as well be interested in

How To Find Numerical Value,

Source: https://www.ablebits.com/office-addins-blog/2020/04/08/excel-isnumber-function-formula-examples/

Posted by: turnerentinver.blogspot.com

0 Response to "How To Find Numerical Value"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel