The ISNA function is a type of error handling function in Excel. It helps to find out whether any cell has “#N/A error” or not. This function returns the value “true” if “#N/A error” is identified. It returns “false” if there is any value other than “#N/A error.”
The ISNA function is a part of the IS functions. It helps in handling “#N/A errors,” analyzing data, and making comparisons.
Syntax
You are free to use this image on your website, templates, etc, Please provide us with an attribution linkArticle Link to be Hyperlinked
For eg:
Source: ISNA Function in Excel (wallstreetmojo.com)
Table of contents
- What is ISNA Function in Excel?
- Syntax
- Parameters
- Purpose of ISNA Function in Excel
- How to Use the ISNA Function in Excel? (with Examples)
- Example #1
- Example #2
- Example #3
- Example #4
- Frequently Asked Questions
- Recommended Articles
Parameters
It is clear from the preceding syntax that the ISNA formula in Excel has only one parameter. It is explained as follows:
- Value: The value can be another function, formula, cell, or value that needs to be tested. It is a very flexible parameter.
The ISNA function in Excel returns the following values:
- True: If the “value” parameter returns “#N/A error” or,
- False: If the “value” parameter does not return “#N/A error”
The examples given in the subsequent section will further explain the ISNA function.
Purpose of ISNA Function in Excel
The goal of the ISNA function is to identify whether “#N/A error” exists in any cell, formula, value or not. “#N/A error” is more common in the formulas which require Excel to find something. If a formula looks for any value that does not exist, the system returns “#N/A error.”
It returns “true” or “false” based on the existence of “#N/A error.” This function helps Excel users deal with the “#N/A error” by replacing it with another value.
How to Use the ISNA Function in Excel? (with Examples)
This section will explain the uses of the ISNA function with the help of examples containing actual data. As stated earlier, it uses only one mandatory parameter.
You can download this ISNA Function Excel Template here – ISNA Function Excel Template
Example #1
In the following image, we have used the FIND function of ExcelFind function in excel finds the location of a character or a substring in a text string. In other words it finds the occurrence of a text in another text, as it gives us the position, the output returned by this function is an integer.read more. It returns the position of the “i” character in cell A2.
So, the output of the FIND function is 7.
Now, let us pass the previous FIND function as a parameter.
Here, we have used the FIND function in the parameter which returns the output “7”. ISNA function returns “false” because the output of the value parameter is not “#N/A error.”
Example #2
Let us pass “#N/A” directly as a parameter to the ISNA formula in Excel.
On directly passing “#N/A” as a parameter to the ISNA function, it returns the value “true.” This proves that ISNA detects “#N/A error” present in any cell.
Example #3
Let us pass “#VALUE!” as a parameter to the ISNA formula in Excel.
The “#VALUE!” parameter is also a data missing error. ISNA returns the value “false” because it does not detect any error other than “#N/A error.”
Example #4
In this example, we use the lookup function as a parameter of the ISNA function.
Here, the output that we get is “true.”
Frequently Asked Questions
#1 – What does the ISNA function do in Excel?
It helps the Excel user in the following ways:
– It detects “#N/A errors.”
– It helps handle “#N/A errors” by returning a particular value, reference, message or formula.
– It helps replace the “#N/A error” with a text of your choice when combined with VLOOKUP and IF function.
– It finds whether a certain value exists in a column or not when combined with the MATCH functionThe MATCH function looks for a specific value and returns its relative position in a given range of cells. The output is the first position found for the given value. Being a lookup and reference function, it works for both an exact and approximate match. For example, if the range A11:A15 consists of the numbers 2, 9, 8, 14, 32, the formula “MATCH(8,A11:A15,0)” returns 3. This is because the number 8 is at the third position.
read more.
– It facilitates comparison between two columns when combined with the MATCH function.
– It helps analyze results, especially when working with groups of formulas.
#2 – How to use the ISNA function with VLOOKUP in Excel?
#3 – What is the opposite of the ISNA function in Excel?
The opposite of the ISNA function is “NOT(ISNA(yourformula)).”
If “yourformula” gives “#N/A error,” the ISNA function will return the value “true.” If “yourformula” has no errors, the ISNA function will return the value “false.”
- The ISNA function is an error handling function in Excel that helps to identify “#N/A error” in a cell.
- The ISNA function, used as a worksheet function, has only one parameter.
- The value parameter can be another function, formula, cell, or value that needs to be tested.
- It returns a Boolean value (true or false).
- The value “true” is returned if “#N/A error” is found and “false” is returned if “#N/A error” is not found.
Recommended Articles
This has been a guide to ISNA Function in Excel. Here we discuss how to use this formula along with an Excel example and a downloadable template. You may also look at these useful functions in Excel –
- IFERROR with VLOOKUP
- IFERROR Excel FunctionThe IFERROR function in Excel checks a formula (or a cell) for errors and returns a specified value in place of the error.read more
- #Div/0! Excel Error#DIV/0! is the division error in Excel which occurs every time a number is divided by zero. Simply put, we get this error when we divide any number by an empty or zero-value cell.read more
- #VALUE! Error in Excel#VALUE! Error in Excel represents that the reference cell the user has either entered an incorrect formula or used a wrong data type (mostly numerical data). Sometimes, it is difficult to identify the kind of mistake behind this error.read more
Excel ISNA Function Guide: How and When to Use (2023)
So you have taken all your time to write a lookup function. But as you hit Enter, instead of the desired value, all that you get in return is the #N/A error.
Duhh… 🥴
A function or a formula returns the #N/A error in Excel when it fails to find the value it has been asked for. No matter how distasteful it looks, you will face the #N/A function in Excel very often. Especially if you use the lookup functions 🙈
But that’s alright – We have the ISNA function in Excel to handle the #N/A errors. To know all about the ISNA function of Excel, jump straight into the guide below.
And yeah, download our free sample workbook here to tag along with the guide.
How to use the ISNA function in Excel
Using the ISNA function in Excel is literally the easiest. You only need to write the ISNA function and refer to the cell or the formula that you want to be checked for the #N/A error.
For example, check here.
The above image has a list of values. Some are error values, and others are formulas or values.
You can use the ISNA function to check each of these cells – do they contain the N/A error? Let’s do it together here 👇
- In the first cell, write the ISNA function as follows:
= ISNA (A2)
- Hit Enter, and that’s it.
- Drag and drop the same formula to the whole list. Here come the results:
For all those cells that have the #N/A error, we get TRUE. And for all the cells with any other value, the ISNA function returns FALSE.
Using the ISNA function alone in Excel makes little sense. However, it becomes super useful when used together with other functions of Excel to evaluate a formula.
Excel ISNA VLOOKUP formula example
The VLOOKUP function is one of Excel’s most commonly known (and used) lookup functions 🔍
It looks for a given lookup value in the first column of a lookup range and returns the corresponding value from any row of that range.
For example, here:
The image above has a list of age records extracted from the national database (let’s assume that 😜).
Below, we have a list of people (on the right) whose ages we want to extract from the list on the left.
- For that, write the VLOOKUP function as follows:
=VLOOKUP(D2,$A$2:$B$8,2,0)
- D2 contains the lookup value (Charles). The person whose age is sought.
- $A$2:$B$8 contains the table array from where the lookup value is sought.
- 2 tells the column number in the table array from where this value is sought. We need the age, so we have referred to column 2 (Ages).
- 0 represents the exact match mode. We do not want VLOOKUP to return approximate matches.
Note that we have turned the table array reference into an absolute one ($A$2:$B$8). This is because we will drag drown this formula to the whole list later👀
And we don’t want Excel to change the cell reference for the table array when we do that.
- All good? Hit Enter to get the results as follows:
We get the age of Charles from the table array – that’s 30. But some names in the list (on the right side), might not be present in the list (on the left side) 🤔
How will the VLOOKUP function find the ages for such names? Let’s see that below.
- Drag and drop the same formula to the entire list of names.
There are the results. For the names present in the list (on the left side), the VLOOKUP returns the age of the people 🧓
But for the names missing from there, we get the #N/A error. Is there some way we can avoid this error?
The ISNA function can help you do that. For that:
- Wrap the VLOOKUP function in the ISNA function as follows:
=ISNA(VLOOKUP(D2,$A$2:$B$8,2,0))
- Hit Enter to see the results for yourself.
- Drag and drop the same to the whole list as follows:
What has the ISNA function done? It evaluates the VLOOKUP function for the #N/A error. If the VLOOKUP function results in an error – the ISNA returns TRUE ✅
And if not, the ISNA function returns FALSE.
This can help you know which name would return an #N/A error beforehand. Accordingly, you can amend your function to prevent the #N/A error.
Excel IF ISNA formula Example
Using the ISNA function with other functions can help you evaluate an #N/A error. But how can you fix this error?
For that, you need to use the IF function together with ISNA. How? Check it out here 🚀
In the example above, we have the TRUE and FALSE values for where there is or there is not an #N/A error. But now we want to replace them with results.
So what do we exactly want to do?
- We want the VLOOKUP function to return the age where the name exists in the table array.
- And if the name doesn’t exist in the table array, we want the value “No Record Found” returned.
To do this, we need to use the ISNA and IF functions together as below 📌
- Wrap the VLOOKUP function in the ISNA function.
=ISNA(VLOOKUP(D2,$A$2:$B$8,2,0))
- Wrap the above function in the IF Function as follows:
= IF ( ISNA ( VLOOKUP ( D2, $A$2:$B$8, 2,0 ) ),
Until now, we have only nested the above formula in the IF function 🎁
- Write the value_if_true argument for the IF function.
= IF ( ISNA ( VLOOKUP ( D2, $A$2:$B$8, 2,0 ) ), “No Record Found”
The IF function returns the value_if_true if the answer of the ISNA function comes out TRUE. And the ISNA function would return TRUE when the VLOOKUP function returns the #N/A error 📍
This means the #N/A error to be posed by the VLOOKUP function would now be replaced by the value “No Record Found”.
- Write the value_if_false argument for the IF function.
=IF(ISNA(VLOOKUP(D2,$A$2:$B$8,2,0)),”No Record”,VLOOKUP(D2,$A$2:$B$8,2,0))
So at this stage, here’s the summary of what would happen📝
The above function would return:
- “No Record Found” if the VLOOKUP fails to find the given name in the table array; and
- The age of the person if the VLOOKUP finds the given name in the table array.
- Hit Enter, and that’s it.
- Drag and drop the same to the whole list.
Yay! We no more have any unpleasant #N/A errors on our list. Either we have the age of the given person or the value specified by us 🏆
That’s it – Now what
And here the ISNA function comes to an end. It is one of the simplest functions of Excel that only performs a logical test and returns a Boolean value (True or False).
The ISNA function can become all the more useful if used together with other functions from the super big functions library of Excel 💪
While all the functions of Excel are equally useful, there are some functions that one must master. Like the VLOOKUP, SUMIF, and IF functions.
Don’t worry if you’re not good at them already. My 30-minute free email course will take you through them all. To enroll, click here now.
Frequently asked questions
The ISNA function performs a logical test in Excel. It checks a given cell or a formula for the #N/A error. If the cell contains or the formula returns the #N/A error, the ISNA function would return TRUE, or FALSE if vice versa.
It is often used together with other functions (like the IF or the VLOOKUP function).
No. There’s no isnotblank function in Excel.
However, Excel offers an ISBLANK function that you can use to check if a cell is not blank. To check if a cell (Say A1) is not blank, you can use the IF function as follows:
= IF (A2<>””, “Not Blank”, “Blank”)
If A1 is not blank, the IF function would return “Not Blank”.
Kasper Langmann2023-02-23T14:52:50+00:00
Page load link
Содержание
- Метод WorksheetFunction.IsNA (Excel)
- Синтаксис
- Параметры
- Возвращаемое значение
- Примечания
- Поддержка и обратная связь
- IS functions
- Description
- Syntax
- Remarks
- Examples
- Example 1
- Excel ISNA Function – How To Use
- Syntax
- Important Characteristics of ISNA Function in Excel
- Examples of ISNA Function
- Example 1 – Simple ISNA function
- Example 2 – ISNA function with VLOOKUP function
- ISNA vs IFNA
- How to Choose Between ISNA & IFNA
- ISNA vs ISERROR
- How to Choose Between ISNA & ISERROR
- ISNA vs ISERR
- How to Choose Between ISNA & ISERR
Метод WorksheetFunction.IsNA (Excel)
Проверяет тип значения и возвращает значение True или False в зависимости от того, ссылается ли значение на значение ошибки #N/A (значение недоступно).
Синтаксис
expression. IsNA (Arg1)
Выражение Переменная, представляющая объект WorksheetFunction .
Параметры
Имя | Обязательный или необязательный | Тип данных | Описание |
---|---|---|---|
Arg1 | Обязательный | Variant | Value — значение, которое требуется протестировать. Значение может быть пустым (пустая ячейка), ошибкой, логическим, текстовым, числом или ссылочным значением или именем, ссылающимся на любое из этих значений, которое требуется проверить. |
Возвращаемое значение
Boolean
Примечания
Аргументы значений функций IS не преобразуются. Например, в большинстве других функций, где требуется число, текстовое значение 19 преобразуется в число 19. Однако в формуле ISNUMBER(«19») значение 19 не преобразуется из текстового значения, и функция IsNumber возвращает значение False.
Функции IS полезны в формулах для проверки результата вычисления. В сочетании с функцией IF они предоставляют метод для обнаружения ошибок в формулах.
Поддержка и обратная связь
Есть вопросы или отзывы, касающиеся Office VBA или этой статьи? Руководство по другим способам получения поддержки и отправки отзывов см. в статье Поддержка Office VBA и обратная связь.
Источник
IS functions
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
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.
Returns TRUE if
Value refers to an empty cell.
Value refers to any error value except #N/A.
Value refers to any error value (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!).
Value refers to a logical value.
Value refers to the #N/A (value not available) error value.
Value refers to any item that is not text. (Note that this function returns TRUE if the value refers to a blank cell.)
Value refers to a number.
Value refers to a reference.
Value refers to text.
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.
Источник
Excel ISNA Function – How To Use
The Excel ISNA function checks whether a value is #N/A or not. The function only returns TRUE upon finding the #N/A error. It returns FALSE for all other values or errors. The objective of the ISNA function is to solely recognize and handle #N/A errors and return TRUE when an #N/A error is found and FALSE for everything else.
By #N/A here, we mean ‘not available’ and ISNA literally means ‘Is not available?’. Now with the emergence of newer functions, there are more refined ways of dealing with #N/A errors but since the ISNA function has been around since Excel 2003, it has served as a decent method of identified #N/A errors.
In this tutorial we will show you how the ISNA function works, its synergy effects with other functions, and where it stands against similar error handling functions.
Table of Contents
Syntax
The syntax of the ISNA function is as follows:
Arguments:
value – The value or expression to be tested for #N/A error.
Important Characteristics of ISNA Function in Excel
- The ISNA function only deals with #N/A errors
- When the function comes across an #N/A error it returns TRUE otherwise it returns FALSE
- ISNA is generally used along with the IF function to handle #N/A errors
- If the formula has any typos or misspelling, the function returns a #NAME?
Examples of ISNA Function
Now would be a good time to look into some examples to understand the ISNA function.
Example 1 – Simple ISNA function
Let’s take a look at ISNA in its simplest form.
We are checking column A for #N/A errors using the ISNA function in its simplest form:
The ISNA function finds an #N/A error in «A2» and hence returns a «TRUE». For all other errors and values, ISNA returns «FALSE». This implies that the ISNA function only singles out #N/A errors.
This is a very basic application of the ISNA function. Let’s move onto more practical examples.
Example 2 – ISNA function with VLOOKUP function
While looking up a value from a set of data, there is of course the possibility of not finding it. When trying to find that missing value using a lookup function (including VLOOKUP, HLOOKUP, XLOOKUP), the result is #N/A since the value is not available.
For example, we have a list of dry cake mixes used for baking and their prices.
We are trying to find the prices of a chocolate cake mix and a marble cake mix. Let’s use the VLOOKUP function to find them:
The list of cake mixes doesn’t have «Marble cake» which is why VLOOKUP has returned an «#N/A» error.
Let’s have a look at the results after adding the ISNA function.
We have added the ISNA function to the VLOOKUP function:
All this is doing right now is telling us whether there was an #N/A error while finding the mentioned cake mixes or not.
Was there a ‘not available’ error finding «Chocolate cake» mix? – FALSE. Chocolate cake mix is present in our dataset.
Was there a ‘not available’ error finding «Marble cake» mix? – TRUE. Marble cake mix is not present in our dataset.
Our objective here is to find the prices of the cake mixes which the ISNA function isn’t doing alone. We will have to add the IF function to get the desired results. Let us do that for you.
We have nested the ISNA and VLOOKUP functions in the IF function like so:
This formula works as follows:
VLOOKUP is told to find the data mentioned in cell «E6» which is «Chocolate cake». The table given to VLOOKUP for searching is within the cell range «B2:C11»; VLOOKUP must find «E6» in the 1 st column (column B) of the given table and return the corresponding value from the 2 nd column (column C). «0» indicates that VLOOKUP must find an exact match.
Since «Chocolate cake» is enlisted in the range of cake mixes, VLOOKUP finds it, picks up the corresponding price from the 2 nd column, and returns the value «$3.21».
The result «$3.21» is passed to ISNA where ISNA checks it for an #N/A error. It doesn’t find an #N/A error and results in «FALSE». The result FALSE is passed to the IF function, which then displays the original result of the VLOOKUP function and so the result «$3.21» is displayed.
In the next case, we will now try to find the price of a «Marble cake» mix. Since the «Marble cake» mix is not listed in our data set so the VLOOKUP is not able to find it in column B and results in an #N/A error. The result is handed over to ISNA and it turns «#N/A» into TRUE. The result TRUE is passed to the IF function, which shows the message «Not Available!» as the final output of the formula.
ISNA vs IFNA
Stepping out of the IS functions family a bit, the IFNA function returns the value specified if the expression resolves to #N/A, otherwise it returns the result of the expression. This would be particularly useful against the ISNA function as we get the same result from IFNA without having to nest ISNA and VLOOKUP functions into the IF function.
Let us show you how the same outcome can be easily achieved by the IFNA function.
Take note that we have attained the exact same results as in the previous example by lesser work using the formula:
Since «Chocolate cake» was available in our set of data, the VLOOKUP function did its work and returned the value «$3.21». No work for IFNA here.
For the next instance, VLOOKUP could not find «Marble cake» in column B and results in an #N/A error. The result is handed over to IFNA and it turns «#N/A» into «Not available» and returns that as the result.
That was fairly uncomplicated compared to using IF, ISNA, and VLOOKUP functions together.
How to Choose Between ISNA & IFNA
The ISNA function may be a suitable tool where the results are needed as TRUE/FALSE but if you’re going for a specified result where you want to have control over the outcome, ISNA will have to be used with the IF function whereas IFNA alone would do the same thing.
ISNA vs ISERROR
Quite like ISNA but as the name suggests, ISERROR (is error?) deals with a larger amount of Excel errors and returns TRUE if any error is detected and FALSE otherwise. While this may seem to be the answer to more problems, it will be hard to pinpoint what error has been detected by the function. Upon using ISERROR with VLOOKUP and IF, ISERROR will cover up the underlying problem and return the custom result instead.
Let’s refer to the previous example and see how this applies.
If you notice, «Chocolate cake» is available in the dataset. Here, we have used the ISERROR function instead of the ISNA function and made a spelling error in the name of the formula (VLOOKUP is misspelled as VLOOKP). The formula:
The result of the VLOOKUP function results in a #NAME? error due to incorrect spelling. The result is passed onto the ISERROR function which results in TRUE as it has found a #NAME? error. IF function is commanded to return the custom text «Not available» which has covered up the #NAME? error and it appears as if the chocolate cake mix data is not available.
This doesn’t truly reflect the scenario since the chocolate cake mix and its price is listed in the table. Let’s see what happens when we try to pass the same error through the ISNA function.
Making the same typo with ISNA would result in a #NAME? error. Hence, a truer representation comes from the ISNA function here which only works for #N/A errors and shows the underlying problem which is the #NAME? error, indicating a spelling error.
Quite useful, ISERROR best serves the need to cover up more errors, affirming whether there are any errors or not.
How to Choose Between ISNA & ISERROR
In most cases, it would be more prudent to use the ISNA function as it would display other errors indicating the relevant issue with the data or formula.
On the other hand, the ISERROR function would work better where more errors need to be handled. It will deal with a greater number of errors including the #N/A error and will confirm whether there are any errors in the data or not.
ISNA vs ISERR
The ISERR function is the same as its ISERROR brother but it returns TRUE for all errors other than the #N/A error and FALSE otherwise. While it will be helpful using ISERR so there is one less error to think about, it will not work for #N/A errors like in the previous example. Let us demonstrate:
It’s nearly the end of the tutorial and we are well aware that there’s going to be no marble cake tonight. As apparent, the ISERR function has resulted in an #N/A error as VLOOKUP could not find «Marble cake» in the dataset despite the command to return «Not Available!».
How to Choose Between ISNA & ISERR
When in need of narrowing down the errors to be checked, ISERR will work for covering up all errors excluding the #N/A error. It is the exact flip of the ISNA function which will be convenient to deal only with #N/A errors. Both result in TRUE/FALSE upon finding the respective errors.
That’s all ISNA has to say about itself but we still have a little riddle for you:
What kind of career would a spider excel in?
See you with another chip from the Excel block!
Источник
The Excel ISNA function checks whether a value is #N/A or not. The function only returns TRUE upon finding the #N/A error. It returns FALSE for all other values or errors. The objective of the ISNA function is to solely recognize and handle #N/A errors and return TRUE when an #N/A error is found and FALSE for everything else.
By #N/A here, we mean ‘not available’ and ISNA literally means ‘Is not available?’. Now with the emergence of newer functions, there are more refined ways of dealing with #N/A errors but since the ISNA function has been around since Excel 2003, it has served as a decent method of identified #N/A errors.
In this tutorial we will show you how the ISNA function works, its synergy effects with other functions, and where it stands against similar error handling functions.
Syntax
The syntax of the ISNA function is as follows:
=ISNA(value)
Arguments:
value
– The value or expression to be tested for #N/A error.
Important Characteristics of ISNA Function in Excel
- The ISNA function only deals with #N/A errors
- When the function comes across an #N/A error it returns TRUE otherwise it returns FALSE
- ISNA is generally used along with the IF function to handle #N/A errors
- If the formula has any typos or misspelling, the function returns a #NAME?
Examples of ISNA Function
Now would be a good time to look into some examples to understand the ISNA function.
Example 1 – Simple ISNA function
Let’s take a look at ISNA in its simplest form.
We are checking column A for #N/A errors using the ISNA function in its simplest form:
=ISNA(A2)
The ISNA function finds an #N/A error in «A2» and hence returns a «TRUE». For all other errors and values, ISNA returns «FALSE». This implies that the ISNA function only singles out #N/A errors.
This is a very basic application of the ISNA function. Let’s move onto more practical examples.
Example 2 – ISNA function with VLOOKUP function
While looking up a value from a set of data, there is of course the possibility of not finding it. When trying to find that missing value using a lookup function (including VLOOKUP, HLOOKUP, XLOOKUP), the result is #N/A since the value is not available.
For example, we have a list of dry cake mixes used for baking and their prices.
We are trying to find the prices of a chocolate cake mix and a marble cake mix. Let’s use the VLOOKUP function to find them:
=VLOOKUP(E6,$B$2:$C$11,2,0)
The list of cake mixes doesn’t have «Marble cake» which is why VLOOKUP has returned an «#N/A» error.
Let’s have a look at the results after adding the ISNA function.
We have added the ISNA function to the VLOOKUP function:
=ISNA(VLOOKUP(E6,$B$2:$C$11,2,0))
All this is doing right now is telling us whether there was an #N/A error while finding the mentioned cake mixes or not.
Was there a ‘not available’ error finding «Chocolate cake» mix? – FALSE. Chocolate cake mix is present in our dataset.
Was there a ‘not available’ error finding «Marble cake» mix? – TRUE. Marble cake mix is not present in our dataset.
Our objective here is to find the prices of the cake mixes which the ISNA function isn’t doing alone. We will have to add the IF function to get the desired results. Let us do that for you.
We have nested the ISNA and VLOOKUP functions in the IF function like so:
=IF(ISNA(VLOOKUP(E6,$B$2:$C$11,2,0)), "Not Available!", (VLOOKUP(E6,$B$2:$C$11,2,0)))
This formula works as follows:
VLOOKUP is told to find the data mentioned in cell «E6» which is «Chocolate cake». The table given to VLOOKUP for searching is within the cell range «B2:C11»; VLOOKUP must find «E6» in the 1st column (column B) of the given table and return the corresponding value from the 2nd column (column C). «0» indicates that VLOOKUP must find an exact match.
Since «Chocolate cake» is enlisted in the range of cake mixes, VLOOKUP finds it, picks up the corresponding price from the 2nd column, and returns the value «$3.21».
The result «$3.21» is passed to ISNA where ISNA checks it for an #N/A error. It doesn’t find an #N/A error and results in «FALSE». The result FALSE is passed to the IF function, which then displays the original result of the VLOOKUP function and so the result «$3.21» is displayed.
In the next case, we will now try to find the price of a «Marble cake» mix. Since the «Marble cake» mix is not listed in our data set so the VLOOKUP is not able to find it in column B and results in an #N/A error. The result is handed over to ISNA and it turns «#N/A» into TRUE. The result TRUE is passed to the IF function, which shows the message «Not Available!» as the final output of the formula.
ISNA vs IFNA
Stepping out of the IS functions family a bit, the IFNA function returns the value specified if the expression resolves to #N/A, otherwise it returns the result of the expression. This would be particularly useful against the ISNA function as we get the same result from IFNA without having to nest ISNA and VLOOKUP functions into the IF function.
Let us show you how the same outcome can be easily achieved by the IFNA function.
Take note that we have attained the exact same results as in the previous example by lesser work using the formula:
=IFNA(VLOOKUP(E6,$B$2:$C$11,2,0),"Not Available!")
Since «Chocolate cake» was available in our set of data, the VLOOKUP function did its work and returned the value «$3.21». No work for IFNA here.
For the next instance, VLOOKUP could not find «Marble cake» in column B and results in an #N/A error. The result is handed over to IFNA and it turns «#N/A» into «Not available» and returns that as the result.
That was fairly uncomplicated compared to using IF, ISNA, and VLOOKUP functions together.
How to Choose Between ISNA & IFNA
The ISNA function may be a suitable tool where the results are needed as TRUE/FALSE but if you’re going for a specified result where you want to have control over the outcome, ISNA will have to be used with the IF function whereas IFNA alone would do the same thing.
ISNA vs ISERROR
Quite like ISNA but as the name suggests, ISERROR (is error?) deals with a larger amount of Excel errors and returns TRUE if any error is detected and FALSE otherwise. While this may seem to be the answer to more problems, it will be hard to pinpoint what error has been detected by the function. Upon using ISERROR with VLOOKUP and IF, ISERROR will cover up the underlying problem and return the custom result instead.
Let’s refer to the previous example and see how this applies.
If you notice, «Chocolate cake» is available in the dataset. Here, we have used the ISERROR function instead of the ISNA function and made a spelling error in the name of the formula (VLOOKUP is misspelled as VLOOKP). The formula:
=IF(ISERROR(VLOOKP(E6,$B$2:$C$11,2,0)), "Not Available!", (VLOOKP(E6,$B$2:$C$11,2,0))) //Incorrect Formula
The result of the VLOOKUP function results in a #NAME? error due to incorrect spelling. The result is passed onto the ISERROR function which results in TRUE as it has found a #NAME? error. IF function is commanded to return the custom text «Not available» which has covered up the #NAME? error and it appears as if the chocolate cake mix data is not available.
This doesn’t truly reflect the scenario since the chocolate cake mix and its price is listed in the table. Let’s see what happens when we try to pass the same error through the ISNA function.
Making the same typo with ISNA would result in a #NAME? error. Hence, a truer representation comes from the ISNA function here which only works for #N/A errors and shows the underlying problem which is the #NAME? error, indicating a spelling error.
Quite useful, ISERROR best serves the need to cover up more errors, affirming whether there are any errors or not.
How to Choose Between ISNA & ISERROR
In most cases, it would be more prudent to use the ISNA function as it would display other errors indicating the relevant issue with the data or formula.
On the other hand, the ISERROR function would work better where more errors need to be handled. It will deal with a greater number of errors including the #N/A error and will confirm whether there are any errors in the data or not.
Recommended Reading: IFERROR Function In Excel
ISNA vs ISERR
The ISERR function is the same as its ISERROR brother but it returns TRUE for all errors other than the #N/A error and FALSE otherwise. While it will be helpful using ISERR so there is one less error to think about, it will not work for #N/A errors like in the previous example. Let us demonstrate:
It’s nearly the end of the tutorial and we are well aware that there’s going to be no marble cake tonight. As apparent, the ISERR function has resulted in an #N/A error as VLOOKUP could not find «Marble cake» in the dataset despite the command to return «Not Available!».
How to Choose Between ISNA & ISERR
When in need of narrowing down the errors to be checked, ISERR will work for covering up all errors excluding the #N/A error. It is the exact flip of the ISNA function which will be convenient to deal only with #N/A errors. Both result in TRUE/FALSE upon finding the respective errors.
That’s all ISNA has to say about itself but we still have a little riddle for you:
What kind of career would a spider excel in?
.
.
.
.
.
Web design
See you with another chip from the Excel block!
В этом руководстве рассматриваются различные способы использования функции ISNA в Excel для обработки ошибок #N/A.
Когда Excel не может найти запрошенное, в ячейке появляется ошибка #Н/Д. Для перехвата и обработки таких ошибок можно использовать функцию ISNA. Какая от этого практическая польза? По сути, это помогает сделать ваши формулы более удобными для пользователя, а ваши рабочие листы — более привлекательными.
Функция Excel ISNA используется для проверки ячеек или формул на наличие ошибок #Н/Д. Результатом является логическое значение: TRUE, если обнаружена ошибка #N/A, FALSE в противном случае.
Эта функция доступна во всех версиях Excel 2000–2021 и Excel 365.
Синтаксис функции ISNA максимально прост:
ИСНА(значение)
Где ценность — это значение ячейки или формула, которую вы хотите проверить на наличие ошибок #Н/Д.
Чтобы создать формулу ISNA в ее базовой форме, укажите ссылку на ячейку в качестве ее единственного аргумента:
=ИСНА(A2)
Если указанная ячейка содержит ошибку #Н/Д, вы получите значение ИСТИНА. В случае любой другой ошибки, значения или пустой ячейки вы получите ЛОЖЬ:
Как использовать ISNA в Excel
Использование функции ISNA в чистом виде имеет мало практического смысла. Чаще она используется вместе с другими функциями для оценки результата определенной формулы. Для этого просто поместите эту другую формулу в ценность аргумент ИСНА:
ИСНА(ваша_формула())
В приведенном ниже наборе данных предположим, что вы хотите сравнить два списка (столбцы A и D) и определить имена, которые присутствуют в обоих списках, и те, которые появляются только в списке 1.
Чтобы сравнить имя в A3 с каждым именем в столбце D, используйте следующую формулу:
=ПОИСКПОЗ(A3, $D$2:$D$9, 0)
Если значение поиска найдено, функция ПОИСКПОЗ возвращает его относительное положение в массиве поиска, в противном случае возникает ошибка #Н/Д. Чтобы проверить результат MATCH, мы вкладываем его в ISNA:
=ISNA(ПОИСКПОЗ(A3, $D$2:$D$9, 0))
Эта формула идет в ячейку B3, а затем копируется в ячейку B14.
Теперь вы можете четко видеть, какие учащиеся прошли все тесты (имя недоступно в столбце D > ПОИСКПОЗ возвращает #Н/Д > ISNA возвращает ИСТИНА) и у кого есть хотя бы один непройденный тест (имя появляется в столбце D > нет ошибки > ISNA возвращает ЛОЖЬ).
Кончик. В Excel 365 и Excel 2021 вы можете использовать более современную функцию XMATCH. вместо ПОИСКПОЗ.
Формула ЕСЛИ ISNA в Excel
По замыслу функция ISNA может возвращать только два логических значения. Чтобы отобразить ваши пользовательские сообщения, используйте его в сочетании с функцией ЕСЛИ:
ЕСЛИ(ИСНА(…), «text_if_error«, «text_if_no_error«)
Немного уточнив наш пример, давайте выясним, какие ученики из группы А не провалили ни одного теста, и вернём для них «Нет проваленных тестов». Для оставшихся студентов мы вернем «Failed». Для этого в логическую проверку ЕСЛИ вставьте формулу ПОИСКПОЗ ISNA, чтобы ЕСЛИ стала самой внешней функцией:
=ЕСЛИ(ИСНА(ПОИСКПОЗ(A3,$D$2:$D$9,0)), «Нет неудачных тестов», «Ошибка»)
Теперь результаты выглядят намного лучше и интуитивно понятны, согласны?
Как использовать ISNA в Excel с функцией ВПР
Комбинация IF ISNA — это универсальное решение, которое можно использовать с любой функцией, которая ищет что-то в наборе данных и возвращает ошибку #Н/Д, когда искомое значение не найдено.
Синтаксис функции ISNA с функцией ВПР следующий:
ЕСЛИ(ИСНА(ВПР(…), «custom_text«, ВПР(…))
В переводе на человеческий язык это говорит: если функция ВПР приводит к ошибке #Н/Д, вернуть пользовательский текст, в противном случае вернуть результат ВПР.
В нашей примерной таблице предположим, что вы хотите вернуть предметы, по которым учащиеся не прошли тесты. Для тех, кто успешно прошел все тесты, будет отображаться «Нет неудачных тестов».
Чтобы искать предметы, мы создаем эту классическую формулу ВПР:
=ВПР(A3, $D$3:$E$9, 2, ЛОЖЬ)
А затем вложите его в общую формулу IF ISNA, описанную выше:
=ЕСЛИ(ISNA(ВПР(A3, $D$3:$E$9, 2, ЛОЖЬ)), «Нет неудачных тестов», ВПР(A3, $D$3:$E$9, 2, ЛОЖЬ))
В Excel 2013 и более поздних версиях вы можете использовать функцию IFNA для обнаружения и обработки ошибок #N/A. Это делает вашу формулу короче и легче для чтения.
Например, мы заменяем ошибки #N/A на тире («-«) и получаем такое изящное решение:
=ЕСЛИНА(ВПР(A3, $D$3:$E$9, 2, ЛОЖЬ), «-«)
Пользователям Excel 365 и 2021 вообще не нужны никакие функции-оболочки, поскольку современный преемник функции ВПР, функция КСПР, может изначально обрабатывать ошибки #Н/Д:
=XLOOKUP(A3, $D$3:$D$9, $E$3:$E$9, «-«)
Результат будет точно таким же, как показано на скриншоте выше.
Формула SUMPRODUCT ISNA для подсчета ошибок #N/A
Чтобы подсчитать ошибки #Н/Д в определенном диапазоне, используйте функцию ЕСНА вместе с СУММПРОИЗВ следующим образом:
СУММПРОИЗВ(—ИСНА(диапазон))
Здесь ISNA возвращает массив значений TRUE и FALSE, двойное отрицание (—) преобразует логические значения в 1 и 0, а СУММПРОИЗВ суммирует результат.
Например, чтобы узнать, сколько учащихся успешно прошли все тесты, измените формулу ПОИСКПОЗ для диапазона значений поиска (A3:A14) и вложите ее в ISNA:
=СУММПРОИЗВ(—ИСНА(ПОИСКПОЗ(A3:A14, D2:D9, 0)))
Формула определяет, что у 9 учащихся нет непройденных тестов, т.е. функция ПОИСКПОЗ возвращает 9 ошибок #Н/Д:
Вот как создавать и использовать формулы ISNA в Excel. Я благодарю вас за чтение и с нетерпением жду встречи с вами в нашем блоге на следующей неделе!
Доступные загрузки
Примеры формул ISNA (файл .xlsx)