

{"id":96655,"date":"2021-06-25T09:00:36","date_gmt":"2021-06-25T03:30:36","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=96655"},"modified":"2021-06-07T17:05:11","modified_gmt":"2021-06-07T11:35:11","slug":"logical-functions-in-excel","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/","title":{"rendered":"Logical Functions in Excel &#8211; AND, OR, XOR, NOT"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Logical functions and formulas help the user to make decisions on the dataset. The function helps in combining multiple conditions and it also helps to evaluate whether a condition is true or false.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A condition is an expression that evaluates whether it is true or false. The expression also helps in determining the data type of the cell. It also helps in checking if the value in the cell is greater than, lesser than or equal to a specified value.<\/span><\/p>\n<h3>Logical Functions in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">Logical functions are being used widely in MS Excel worksheet to evaluate and analyze the data present in the sheet.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let&#8217;s look at some important functions in MS-Excel. These functions and formulas in excel help to analyze and evaluate the data in an organized manner.\u00a0<\/span><\/p>\n<p><strong>Logical functions and its description<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Logical Function<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">And<\/span><\/td>\n<td><span style=\"font-weight: 400;\">And condition checks multiple criteria and returns true if every condition satisfies.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">If<\/span><\/td>\n<td><span style=\"font-weight: 400;\">If the criteria is met, it returns true or else it returns false.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Iferror<\/span><\/td>\n<td><span style=\"font-weight: 400;\">If an error occurs in a cell, it returns a value.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Ifna<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returns true if #N\/A error occurs.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">not<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returns true if the criteria becomes false and returns false if criteria is met.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">OR<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Used when evaluating multiple conditions. It returns true if any or all of the conditions are true or else it returns false.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">True<\/span><\/td>\n<td><span style=\"font-weight: 400;\">True function compares the result of a function is either true or false. This function returns the output as either true or false.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">False<\/span><\/td>\n<td><span style=\"font-weight: 400;\">False function compares the result of a function is either true or false. This function returns the output as either true or false.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Switch\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">This evaluates a list of values and returns the first match value. If there is no match value available then an optional default value is returned.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Let&#8217;s get into the IF formula and its parameters.<\/span><\/p>\n<h3>IF Function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">The IF Function is one of the logical functions and the user can use IF statements on the worksheet to evaluate the values to true or false. If it meets the user condition then it shows the output as true or else it returns false. The IF function can also combine with the functions such as AND, OR.\u00a0<\/span><\/p>\n<p><b>Note:\u00a0<\/b><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">IF function returns 0 or 1 if no value is provided in the place of value_if_true, value_if_false.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Add argument of value_if_true, value_if_false to see if the right value returns.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">If #NAME error occurs, it means the formula is misspelled.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">The user can nest upto 64 IF functions together.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Every element of the array is evaluated when IF condition is carried out in an array.<\/span><\/li>\n<\/ul>\n<h4>Excel Formula<\/h4>\n<p><span style=\"font-weight: 400;\">=IF(logical_test, [value_if_true], [value_if_false])<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the if function, we have three parameters to fill. The three parameters are:<\/span><\/p>\n<p><b>a. logical_test<\/b><span style=\"font-weight: 400;\"> &#8211; A logical expression that evaluates as true or false. This is a required parameter.<\/span><\/p>\n<p><b>b. value_if_true<\/b><span style=\"font-weight: 400;\"> \u2013 This is one of the optional parameters. Whatever the value we provide here is returned as true if logical_test satisfies.<\/span><\/p>\n<p><b>c. value_if_false<\/b><span style=\"font-weight: 400;\"> &#8211; This is also one of the optional parameters. Whatever the value we provide here is returned as false if logical_test does not satisfy.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s look at a sample without providing the optional parameters:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96877\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1.png\" alt=\"Logical Operator Sample\" width=\"523\" height=\"435\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1.png 523w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1-300x250.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1-150x125.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1-520x433.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image13-1-320x266.png 320w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In the above sample, we have not provided any value in the value_if_true and value_if_false criteria. Since we haven\u2019t provided anything, the excel sheet itself considers it as 1 and 0. If it meets the condition, then 1 is shown else it shows as 0.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s look at a sample of IF function:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96878\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1.png\" alt=\"VBA Logical Operator\" width=\"572\" height=\"446\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1.png 572w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1-300x234.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1-150x117.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1-520x405.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image10-1-320x250.png 320w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are going to see whether the EB Cost of each house is more than 1000 rupees. If it\u2019s more than 1000 then it prints yes or else it prints no in the specific cell.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Observe the formula of the D3 cell in the formula bar. Since, the EB cost is 1250, it prints yes as provided in the formula parameters.<\/span><\/p>\n<p><strong>Note: The value that we enter after the logical_test parameter will be the value which will show up, when the criteria satisfies.<\/strong><\/p>\n<h4>If with calculation in Excel<\/h4>\n<p><span style=\"font-weight: 400;\">If the function can also be used for the purpose of calculation. Let\u2019s see a sample to understand it more briefly<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96900\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con.png\" alt=\"VBA Logical Functions\" width=\"1025\" height=\"452\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con.png 1025w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con-300x132.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con-150x66.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con-768x339.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con-720x318.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con-520x229.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/if-con-320x141.png 320w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are adding 100 if the consumption is less than 100 units or else we are subtracting 100 from it.<\/span><\/p>\n<h4>If with AND in Excel<\/h4>\n<p><span style=\"font-weight: 400;\"><strong>Excel syntax<\/strong>: IF(AND(condition 1, condition 2), \u201cvalue_if_true\u201d, \u201cvalue_if_false\u201d)<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><strong>Excel Formula<\/strong> =IF(AND(B3&gt;100,C3&gt;1000),\u201dYES\u201d,\u201dNO\u201d)<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">If both condition 1 and condition 2 evaluates to TRUE, then the value that function returns is \u201cYES\u201d.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">If any of the conditions or every condition evaluates to FALSE, then the value that function returns is \u201cNO\u201d.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Now, let\u2019s look at how to apply and criteria with an if function. Look at the below example to understand it.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96879\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18.png\" alt=\"VBA Logical operator\" width=\"648\" height=\"491\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18.png 648w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18-300x227.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18-150x114.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18-520x394.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image18-320x242.png 320w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In the above sample, we are trying to see in which all houses there were more than 100 units of consumption and the EB Cost is above 1000. To apply this condition, we are using AND criteria in the if function.\u00a0<\/span><\/p>\n<h4>If with OR in Excel<\/h4>\n<p><span style=\"font-weight: 400;\">Now, let\u2019s try to implement OR criteria with the if function.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Look at the sample below:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96880\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19.png\" alt=\"If with OR Operator in VBA\" width=\"659\" height=\"464\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19.png 659w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19-300x211.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19-150x106.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19-520x366.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image19-320x225.png 320w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are checking if the units are more than 50 or 150. In the D3 cell, the result has come \u201cNo\u201d because the units utilized in that house is only 25. It does not satisfy both conditions. Hence, the value is no.<\/span><\/p>\n<h3>Nested IF in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">Nested IF is a function that contains many IF statements inside an IF function. We can also say it as the function starts with If function and other IF functions are included inside the original IF function.\u00a0<\/span><\/p>\n<p><b>Nested IF formula: <\/b><span style=\"font-weight: 400;\">=IF(logical_test,[value_if_true],[value_if_false],IF(logical_test,[value_if_true],[value_if_false], &#8230;))<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s look at the concept of using an if function inside an if function itself. Have a look at the sample to understand it briefly:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96881\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1.png\" alt=\"Nested If in VBA\" width=\"810\" height=\"459\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1.png 810w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1-300x170.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1-150x85.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1-768x435.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1-720x408.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1-520x295.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image9-1-320x181.png 320w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are trying to implement multiple if conditions in one cell. This helps in evaluating the cells. Here, we are checking whether the cost is low, moderate or high using nested if.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the value is below 500, the cost type is low, if the value is below 1000, the cost type is moderate and if the value is\u00a0 above 1000, then its cost type is high.<\/span><\/p>\n<h3>IFS Function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">IFS is a function which contains one or more arguments inside a function. The\u00a0 user uses IFS statements to evaluate multiple conditions without using many if statements. It is much simpler to read and it results in the value corresponding to the first true statement.\u00a0<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<p><span style=\"font-weight: 400;\">IFS(Logical_Test1, value_if_true1, [Logical_Test2, value_if_true2], [Logical_Test3, value_if_true3],&#8230;)<\/span><\/p>\n<p><strong>Arguments:<\/strong><\/p>\n<p><strong>Logical_Test1:<\/strong><span style=\"font-weight: 400;\"> It is one of the required parameters and it is the condition that evaluates to true or false.\u00a0<\/span><\/p>\n<p><strong>Value_if_true1<\/strong>:<span style=\"font-weight: 400;\"> It is also one of the required parameters in the function and it can be empty also. This is the result that will be returned if the logical_test1 evaluates to true.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The other arguments are optional, the logical_test arguments are the conditions that evaluate to true or false and the value_if_true arguments are the value to be returned if the logical_test conditions are true.\u00a0\u00a0<\/span><\/p>\n<p><strong>Example:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96883\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22.png\" alt=\"IFS Function in VBA\" width=\"945\" height=\"630\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22.png 945w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-300x200.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-150x100.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-768x512.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-720x480.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-520x347.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-320x213.png 320w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image22-272x182.png 272w\" sizes=\"auto, (max-width: 945px) 100vw, 945px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are trying to implement multiple if conditions in one cell. This helps in evaluating the cells. Here, we are checking whether the units consumed are low, moderate or high using an IFS statement.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the value is below 20, the units consumed is low, if the value is below 300, the units consumed is moderate and if the value is below 1000, then its units consumed is high.<\/span><\/p>\n<p><strong>Notes<\/strong><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">The functions are limited to 254 parameters and so the user can have up to 127 pairs of arguments.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">If none of the conditions are met and to overcome the error, enter a condition that will always be true at your final logical_test argument.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">If no TRUE conditions are found, IFS returns #N\/A! Error.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">The #N\/A! Error occurs if no condition evaluates to true.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">The #VALUE! Error occurs when the logical_test argument resolves to a value other than true or false.\u00a0<\/span><\/li>\n<\/ul>\n<h3>AND Function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">The AND Function is one of the logical functions and the user uses the AND statements on the worksheet to evaluate the values to true or false. If the user enters more than one argument to evaluate and only if all the condition satisfies, it results true or else it returns false.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The AND function returns true only if all of the arguments satisfies.\u00a0\u00a0<\/span><\/p>\n<p><strong>Excel Formula:<\/strong><span style=\"font-weight: 400;\"> AND(Logical Argument1, Logical Argument2, Logical Argument3,..)<\/span><\/p>\n<p><strong>Argument:<\/strong><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Logical Argument 1: It is the first condition to evaluate.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Logical Argument 2: It is the second condition to evaluate.<\/span><\/li>\n<\/ul>\n<p><strong>NOTE:<\/strong><\/p>\n<p>1. Values are ignored if the array contains text or empty cells.<\/p>\n<p>2. The function returns the #VALUE! Error when the specified range has no logical values.<\/p>\n<h3>How to Open AND Function in Excel?<\/h3>\n<p>To open AND function in Excel, follow the steps:<\/p>\n<p><span style=\"font-weight: 400;\">1: Click on the Formulas tab and choose the logical icon from the ribbon.<\/span><\/p>\n<p><strong>Note: The list of functions appears.<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">2: Choose AND function from the list of functions available.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96884\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21.png\" alt=\"AND Function in VBA\" width=\"839\" height=\"626\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21.png 839w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21-300x224.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21-150x112.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21-768x573.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21-720x537.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21-520x388.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image21-320x239.png 320w\" sizes=\"auto, (max-width: 839px) 100vw, 839px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Let&#8217;s look at a sample:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96885\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17.png\" alt=\"AND Function in VBA\" width=\"627\" height=\"447\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17.png 627w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-300x214.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-150x107.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-520x371.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-320x228.png 320w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are trying to check whether the cell satisfies both conditions. If it does, then the result appears as true or else false.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the D3 cell, the value is false because the B2 cell value is less than 200. Hence, the value appeared false as the condition didn\u2019t satisfy.<\/span><\/p>\n<h3>OR function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">The OR function is one of the logical functions and the user uses the OR statements on the worksheet to evaluate the values to true or false. If the user enters more than one argument to evaluate and if any of the conditions satisfy, it results true, else it returns false.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The OR function returns true even if one of the arguments satisfies.\u00a0\u00a0<\/span><\/p>\n<p><strong>Excel Formula:<\/strong><span style=\"font-weight: 400;\"> OR(Logical Argument1, Logical Argument2, Logical Argument3,..)<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Logical Argument 1 \u2013 the condition which we want to evaluate and returns either true or false.<\/span><\/li>\n<li>Logical Argument 2 \u2013 This condition is the optional, second condition which we want to evaluate for TRUE or FALSE.<\/li>\n<\/ul>\n<p><strong>NOTE<\/strong>:<\/p>\n<p><span style=\"font-weight: 400;\">1. Values are ignored if the array contains text or empty cells.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">2. The function returns the #VALUE! Error when the specified arguments are text values. It also returns errors when there are no logical values.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">3. To evaluate an array with OR formula, press Ctrl+Shift+Enter.<\/span><\/p>\n<h4>When to use OR Function?<\/h4>\n<p><span style=\"font-weight: 400;\">The user can use OR function when they want to check multiple conditions in a defined cell.<\/span><\/p>\n<h4>How to Open OR Function in Excel?<\/h4>\n<p><span style=\"font-weight: 400;\">To open OR function in Excel, follow the steps:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">1: Click on the Formulas tab and choose the logical icon from the ribbon.<\/span><\/p>\n<p><strong>Note: The list of functions appears.<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">2: Choose OR function from the list of functions available.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96886\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1.png\" alt=\"OR Operator in VBA\" width=\"1074\" height=\"601\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1.png 1074w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-300x168.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-1024x573.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-150x84.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-768x430.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-720x403.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-520x291.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image11-1-320x179.png 320w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/a><\/p>\n<h4>How to use OR Function in Excel?<\/h4>\n<p><span style=\"font-weight: 400;\">The OR Function is very easy and much simpler to use. The user can manually enter the formula by using the dialogue box and enter the required logical conditions according to the requirement in the spreadsheet.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, let\u2019s try implementing the OR function in the spreadsheet. Remember, this function returns the true value even if one condition meets the criteria.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let&#8217;s try it out with a sample.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96885\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17.png\" alt=\"AND Function in VBA\" width=\"627\" height=\"447\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17.png 627w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-300x214.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-150x107.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-520x371.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image17-320x228.png 320w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are checking whether the units are above 200 or below 700. Since, every B column cell is above 200. It returns the result as true for every corresponding cell because it has met its condition.<\/span><\/p>\n<p>NOTE: <span style=\"font-weight: 400;\">In And criteria, both the conditions should meet its criteria whereas in the OR condition, meeting anyone criteria is enough to give the output as true.<\/span><\/p>\n<h3>IFERROR in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">If the formula throws an error then the user can specify a value to display instead of showing an error in the cell. This function could be widely helpful when the user runs into errors rarely and prefers to have a clean spreadsheet.<\/span><\/p>\n<p><strong>Excel formula<\/strong><b>:<\/b><span style=\"font-weight: 400;\"> =IFERROR(value,value_if_error).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This function is used to bring out a meaningful value if the cell contains an error.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96887\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3.png\" alt=\"IfError in VBA\" width=\"601\" height=\"453\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3.png 601w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3-300x226.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3-150x113.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3-520x392.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image4-3-320x241.png 320w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are printing meaningful information corresponding to the error cell using the iferror formula.<\/span><\/p>\n<p><strong>True &amp; False:<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">These logical values return true if the condition is met or else it returns false.<\/span><\/p>\n<p><strong>Syntax<\/strong><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">TRUE()<\/span><\/li>\n<li>FALSE()<\/li>\n<\/ul>\n<p><strong>Arguments<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">There are no arguments for true &amp; false functions.<\/span><\/p>\n<p><strong>Notes<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">The true &amp; false function is provided in excel for compatibility purposes.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96888\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2.png\" alt=\"VBA Logical Operators\" width=\"603\" height=\"459\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2.png 603w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2-300x228.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2-150x114.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2-520x396.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image5-2-320x244.png 320w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Here, if the c column cells contain the value low, then it returns true or else it returns false.\u00a0<\/span><\/p>\n<h3>AND OR function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">Let\u2019s look at the sample where we use and function, or function together in a sample.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Look at the sample below:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96889\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20.png\" alt=\"AND OR function in VBA\" width=\"717\" height=\"444\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20.png 717w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20-300x186.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20-150x93.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20-520x322.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image20-320x198.png 320w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are trying to check whether any of the two conditions are met. If one criteria in both the or conditions is met, then the value returned will be true. Or else it returns false.<\/span><\/p>\n<h3>NOT Function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">The not function simply returns the opposite of the logic we have provided. In the case of true, it comes out with false and vice versa.<\/span><\/p>\n<p><strong>Excel Formula<\/strong><span style=\"font-weight: 400;\"> =NOT (Logical Argument)\u00a0<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\"><strong>Logical Argument<\/strong> &#8211; It can be evaluated to TRUE or FALSE<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">The logical argument can be entered in the formula itself or it can be entered as a reference to a cell and the cell contains a logical value. This function always returns the boolean value i.e., either TRUE or FALSE.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s look at a sample to understand:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96876\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3.png\" alt=\"Logical Operator in VBA\" width=\"647\" height=\"466\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3.png 647w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3-300x216.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3-150x108.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3-520x375.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image1-3-320x230.png 320w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, we are checking whether the units are greater than 200. In the B3 cell, the unit is only 25 but still the output that we have got is true. And this is because it&#8217;s a NOT function, it simply reverses the answer. Since, the condition is false and not in the before, the value appears to be true.\u00a0<\/span><\/p>\n<p><strong>Example: #VALUE! Error<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">The error appears when the argument given is not a logical or numerical value.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Suppose, if the user gives a logical argument as the range. Then the function returns a #VALUE error because the NOT function does not allow any range and it can take only a single logical argument at a time.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image23.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96890\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image23.png\" alt=\" #VALUE! Error in VBA\" width=\"516\" height=\"199\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image23.png 516w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image23-300x116.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image23-150x58.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image23-320x123.png 320w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/a><\/p>\n<p><strong>Example &#8211; NOT Function for an empty cell or \u201c0\u201d<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">The \u201cNOT\u201d function returns TRUE if the cell is empty or it contains 0.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image12-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96893\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image12-2.png\" alt=\"Not Function in VBA\" width=\"521\" height=\"179\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image12-2.png 521w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image12-2-300x103.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image12-2-150x52.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image12-2-320x110.png 320w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Cell B2 contains the value 0.\u00a0 The user applies the NOT function referring to the B2 cell as a logical argument, the output returned is TRUE.\u00a0<\/span><\/p>\n<p><strong>Example &#8211; NOT Function for Decimals<\/strong><\/p>\n<p>The \u201cNOT\u201d function returns FALSE if the cell contains the decimal value.<\/p>\n<p>The cell B2 contains the value 22.5 in the cell.\u00a0 The user applies the NOT function referring to the B2 cell as a logical argument, the output returned is FALSE.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image2-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96892\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image2-3.png\" alt=\" #VALUE! Error\" width=\"515\" height=\"225\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image2-3.png 515w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image2-3-300x131.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image2-3-150x66.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image2-3-320x140.png 320w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/a><\/p>\n<p><strong>Example &#8211; NOT Function for Negative Number<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">The \u201cNOT\u201d function returns FALSE if the cell contains the negative number value.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> <a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image14-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96891\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image14-1.png\" alt=\"NOT Function in VBA\" width=\"515\" height=\"197\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image14-1.png 515w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image14-1-300x115.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image14-1-150x57.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image14-1-320x122.png 320w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Cell B2 contains the value -100.\u00a0 The user applies the NOT function referring to the B2 cell as a logical argument, the output returned is FALSE.\u00a0<\/span><\/p>\n<p><strong>Example &#8211;\u00a0 When the reference is Boolean Input<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">The \u201cNOT\u201d function returns FALSE if the cell contains the true value and if the cell contains false value then the \u2018NOT\u2019 function returns TRUE.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96894\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image8.png\" alt=\"Not Function in VBA\" width=\"516\" height=\"241\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image8.png 516w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image8-300x140.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image8-150x70.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image8-320x149.png 320w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Cell A2 contains the value True.\u00a0 The user applies the NOT function referring to the A2 cell as a logical argument, the output returned is FALSE. Cell A3 contains the value False.\u00a0 The user applies the NOT function referring to the A3 cell as a logical argument, the output returned is FALSE.<\/span><\/p>\n<h4>Not function with Isblank<\/h4>\n<p><span style=\"font-weight: 400;\">This function checks whether the cells are blank or not in the spreadsheet. If the cells are blank, then it returns false as we are using it along with a not function or else it returns true.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96895\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15.png\" alt=\"IsBlank Function in VBA\" width=\"642\" height=\"540\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15.png 642w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15-300x252.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15-150x126.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15-520x437.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image15-320x269.png 320w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n<h4>Not Function along with OR and IF function<\/h4>\n<p><span style=\"font-weight: 400;\">We are going to implement the Not logical function with the other two logical functions.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96896\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3.png\" alt=\"Not Function in VBA\" width=\"800\" height=\"440\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3.png 800w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3-300x165.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3-150x83.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3-768x422.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3-720x396.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3-520x286.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image3-3-320x176.png 320w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In this sample, the formula helps you to tell about the amount the house is going to pay, it&#8217;s either a less pay or a high pay. If the condition is true, then it returns less pay or else it returns as high pay as per the formula.<\/span><\/p>\n<h3>XOR function in Excel<\/h3>\n<p><span style=\"font-weight: 400;\">In this xor function, the value will return true when the first criteria is alone true and even though the second argument is false,it returns true. The value returns false if both the criteria satisfies or if both the criteria are unsatisfied.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<p><span style=\"font-weight: 400;\">xor(Logical1,[Logical2],..)<\/span><\/p>\n<p><b>Arguments<\/b><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Logical1 &#8211; It is a required argument and it can be of logical value, arrays or references.<\/span><\/li>\n<li>Logical2.. &#8211; It is an optional parameter and the xor function can check upto 254 conditions.<\/li>\n<\/ul>\n<p><strong>NOTE<\/strong>:<\/p>\n<p><span style=\"font-weight: 400;\">1. Values are ignored if the array contains text or empty cells.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">2. The function returns the #VALUE! Error when the specified arguments are text values. It also returns errors when there are no logical values.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">3. The function returns the #NAME? Error when the excel does not recognize the function name.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">4. To evaluate an array with XOR formula, press Ctrl+Shift+Enter.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">5. The XOR functions output is true if the number of true inputs is odd or if true inputs are even, then the output is false.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-96897\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16.png\" alt=\"XOR Function in VBA\" width=\"631\" height=\"462\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16.png 631w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16-300x220.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16-150x110.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16-520x381.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/image16-320x234.png 320w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">From the above sample, we can observe the formula in the formula bar. In the D3 cell, the result is false because both the conditions are satisfied.<\/span><\/p>\n<h3>Summary<\/h3>\n<p><span style=\"font-weight: 400;\">1. Utilization of logical functions in a spreadsheet will help you understand and analyze the data of your spreadsheet.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">2. It&#8217;s widely used for decision-making purposes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">3. It results using default values such as true or false.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">4. It assists in evaluating the data using formulas and functions.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logical functions and formulas help the user to make decisions on the dataset. The function helps in combining multiple conditions and it also helps to evaluate whether a condition is true or false.\u00a0 A&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":96752,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24129],"tags":[24524,24523,24528,24527,24522,24529,24526,24525],"class_list":["post-96655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ms-excel","tag-and-function-in-excel","tag-if-function-in-excel","tag-iferror-in-excel","tag-ifs-function-in-excel","tag-logical-functions-in-excel","tag-not-function-in-excel","tag-or-function-in-excel","tag-xor-function-in-excel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Logical Functions in Excel - AND, OR, XOR, NOT - DataFlair<\/title>\n<meta name=\"description\" content=\"Logical functions (AND,OR,NOT,XOR) help the user to make decisions on the dataset. They help to evaluate whether a condition is true or false.\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Logical Functions in Excel - AND, OR, XOR, NOT - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Logical functions (AND,OR,NOT,XOR) help the user to make decisions on the dataset. They help to evaluate whether a condition is true or false.\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-25T03:30:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/Logical-Function-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Logical Functions in Excel - AND, OR, XOR, NOT - DataFlair","description":"Logical functions (AND,OR,NOT,XOR) help the user to make decisions on the dataset. They help to evaluate whether a condition is true or false.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/","og_locale":"en_US","og_type":"article","og_title":"Logical Functions in Excel - AND, OR, XOR, NOT - DataFlair","og_description":"Logical functions (AND,OR,NOT,XOR) help the user to make decisions on the dataset. They help to evaluate whether a condition is true or false.\u00a0","og_url":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-06-25T03:30:36+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/Logical-Function-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"Logical Functions in Excel &#8211; AND, OR, XOR, NOT","datePublished":"2021-06-25T03:30:36+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/"},"wordCount":2991,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/Logical-Function-1.jpg","keywords":["And function in Excel","If function in Excel","IFERROR in Excel","IFS function in Excel","logical functions in excel","NOT Function in Excel","OR function in Excel","XOR function in Excel"],"articleSection":["MS Excel Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/","url":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/","name":"Logical Functions in Excel - AND, OR, XOR, NOT - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/Logical-Function-1.jpg","datePublished":"2021-06-25T03:30:36+00:00","description":"Logical functions (AND,OR,NOT,XOR) help the user to make decisions on the dataset. They help to evaluate whether a condition is true or false.\u00a0","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/Logical-Function-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/06\/Logical-Function-1.jpg","width":1200,"height":628,"caption":"Logical Functions in Excel"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/logical-functions-in-excel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"MS Excel Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/ms-excel\/"},{"@type":"ListItem","position":3,"name":"Logical Functions in Excel &#8211; AND, OR, XOR, NOT"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/96655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=96655"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/96655\/revisions"}],"predecessor-version":[{"id":96901,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/96655\/revisions\/96901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/96752"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=96655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=96655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=96655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}