{"id":31069,"date":"2023-01-19T07:12:35","date_gmt":"2023-01-19T01:42:35","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/"},"modified":"2023-01-19T07:12:35","modified_gmt":"2023-01-19T01:42:35","slug":"solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/","title":{"rendered":"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-52658161\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"52658161\" data-parentid=\"52624283\" data-score=\"0\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<h2>Handling the infamous VBA Errors (2042) successfully!?<\/h2>\n<p>Before using this code be sure you have studied at least the customize section carefully or you might lose data.<br \/>\nMost importantly the second column must always be adjacent to the right of the first column, otherwise this code couldn&#8217;t have been done with the &#8216;array copy-paste version&#8217;.<br \/>\n@Melbee: I am assuming you have your initial data in columns A<br \/>\n<code>ciFirstCol<\/code><br \/>\n and B <code>iSecondCol = ciFirstCol + 1<\/code> and the result should be in column C <code>cCOff 'if 1 then first column next to the second column<\/code>. If not make changes in the customize section.  <\/p>\n<pre><code>Option Explicit\n'-------------------------------------------------------------------------------\nSub XthColumnResult()\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n'Description\n  'In an Excel worksheet uses two adjacent columns of initial data as arguments\n  'for a function whose result is pasted into a third column anywhere to the\n  'right of the two initial columns.\n  '(In short: 2 cols of data, perform calculation, result in third column)\n'Arguments as constants\n  'cWbName\n    'The path of the workbook, if \"\" then ActiveWorkbook\n  'cWsName\n    'Name of the worksheet, if \"\" then ActiveSheet\n  'cloFirstRow\n    'First row of data\n  'ciFirstCol\n    'First column of data\n  'cCOff\n    'Column offset, where to paste the results into.\n'Returns\n  'The resulting data in a new column to the right of the two initial adjacent\n  'columns of data.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n'-- CUSTOMIZE BEGIN --------------------\n  Const cWbName As String = \"\" 'Workbook Path (e.g. \"C:\\MyExcelVBA\\Data.xls\")\n  Const cWsName As String = \"\" 'Worksheet Name (e.g. \"Sheet1\", \"Data\",... etc.\n  Const cloFirstRow As Long = 3 'First Row of Data\n\n  'Const cloLastRow as Long = Unknown &gt;therefore&gt; Dim loRow as Long\n\n  Const ciFirstCol As Integer = 1 'First Column of Data (1 for A, 2 for B etc.\n\n  'Second column of data must be adjacent to the right of first column.\n  'See iSecondCol. Therefore Dim iSecondCol As Integer\n\n  'Column offset where to paste the results into. Default is 1 i.e. the first\n  'column next to the second column.\n  Const cCOff As Integer = 1\n'-- CUSTOMIZE END ----------------------\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Variables\n  Const cStrVBAError As String = \"Error 20\" 'Debug VBA Error Variable\n  Const cStrVBAErrorMessage As String = \"Not Possible.\" 'Debug VBA Error Message\n  Dim oWb As Workbook\n  Dim oWs As Worksheet\n  Dim oRng As Range\n  Dim TheArray() As Variant\n  Dim SmallArray() As Variant\n  Dim loRow As Long 'Last Row of Data\n  Dim iSecondCol As Integer 'Second Column of Data\n  Dim iF1 As Integer 'Column Counter\n  Dim loArr As Long 'Array Row Counter\n  Dim iArr As Integer 'Array Column Counter\n  Dim str1 As String 'Debug String\n  Dim str2 As String 'Debug Helper String\n  Dim varArr As Variant 'Helper Variable for the Array\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Determine workbook and worksheet\n  If cWbName = \"\" Then\n    Set oWb = ActiveWorkbook\n   Else\n    Set oWb = Workbooks(cWbName)\n  End If\n  If cWsName = \"\" Then\n    Set oWs = oWb.ActiveSheet\n   Else\n    Set oWs = oWb.Worksheets(cWsName)\n  End If\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Calculate second column of data\n  iSecondCol = ciFirstCol + 1\n  'Calculate last row of data (the greatest row of all columns)\n  loRow = 0\n  'Trying to translate the code to English:\n  'For each column go to the last cell and press crtl+up which is the last\n  'cell used in that column and use the row property...\n  For iF1 = ciFirstCol To iSecondCol\n    '...and check if it is greater than loRow.\n    If loRow &lt; oWs.Cells(Rows.Count, ciFirstCol + iF1 - 1).End(xlUp).Row Then\n      'Assign the row to loRow (if it is greater than loRow).\n      loRow = oWs.Cells(Rows.Count, ciFirstCol + iF1 - 1).End(xlUp).Row\n    End If\n  Next\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Status\n    'The last row of data has been calculated. Additionally the first row, the\n    'first column and the second column will be the arguments of the following\n    'range (to be assigned to an array).\n  'Remarks\n    'When performing calculation, objects like workbooks, worksheets, ranges are\n    'usually very slow. To speed up, an array is introduced to hold the data\n    'and to calculate from there which is dozens of times faster.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Assign the range of data to an array.\n  TheArray = oWs.Range(Cells(cloFirstRow, ciFirstCol), Cells(loRow, iSecondCol))\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Status\n    'All data is now in TheArray ready for calculation.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n'  str1 = \"Initial Contents in TheArray\"\n'  For loArr = LBound(TheArray, 1) To UBound(TheArray, 1)\n'    For iArr = LBound(TheArray, 2) To UBound(TheArray, 2)\n'      If iArr &gt; 1 Then\n'        str1 = str1 &amp; Chr(9) 'Next Column\n'       Else 'First run-though.\n'        str1 = str1 &amp; vbCrLf 'Next Row\n'      End If\n'      If Not IsError(TheArray(loArr, iArr)) Then\n'        str1 = str1 &amp; TheArray(loArr, iArr)\n'       Else\n'        str1 = str1 &amp; VbaErrorString(TheArray(loArr, iArr))\n'      End If\n'    Next\n'  Next\n'  Debug.Print str1\n'  str1 = \"\"\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Remarks\n    'A one-based array is needed to be pasted into the worksheet via range.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Create a new array for the resulting column.\n  ReDim SmallArray(LBound(TheArray) To UBound(TheArray), 1 To 1)\n\n  'Calculate values of the resulting column.\n  For loArr = LBound(TheArray, 1) To UBound(TheArray, 1)\n    'Read values from TheArray and calculate.\n    If IsError(TheArray(loArr, 1)) Then 'First column error\n      'VBA Error Handling, the result if both columns contain an error.\n      varArr = VbaErrorString(TheArray(loArr, 1))\n     Else\n      If IsError(TheArray(loArr, 2)) Then 'Second column error\n        'VBA Error Handling\n        varArr = VbaErrorString(TheArray(loArr, 2))\n       Else\n        If TheArray(loArr, 1) = \"\" Or TheArray(loArr, 2) = \"\" Then '\"\"\n           varArr = \"#N\/A\"\n         Else\n          Select Case TheArray(loArr, 1) 'Equal\n            Case TheArray(loArr, 2)\n              varArr = True\n            Case Is &lt;&gt; TheArray(loArr, 2) 'Not equal\n              varArr = False\n            Case Else\n              varArr = \"UNKNOWN ERROR\" 'Should never happen.\n          End Select\n        End If\n      End If\n    End If\n    'Write the results to SmallArray.\n    SmallArray(loArr, 1) = varArr\n  Next\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Status\n    'The resulting column containing the results has been written to SmallArray.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n'  str1 = \"Resulting Contents in SmallArray\"\n'  For loArr = LBound(SmallArray, 1) To UBound(SmallArray, 1)\n'    If Not IsError(SmallArray(loArr, 1)) Then\n'      str1 = str1 &amp; vbCrLf &amp; SmallArray(loArr, 1)\n'     Else\n'      'VBA Error Handling\n'      str1 = str1 &amp; vbCrLf &amp; VbaErrorString(SmallArray(loArr, 1))\n'    End If\n'  Next\n'  Debug.Print str1\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Calculate the range where to paste the data,\n  Set oRng = oWs.Range(Cells(cloFirstRow, iSecondCol + 1), _\n    Cells(loRow, iSecondCol + 1))\n  'Paste the resulting column to worksheet.\n  oRng = SmallArray\n\n'  str1 = \"Results of the Range\"\n'  For loArr = 1 To oRng.Rows.Count\n'    If Not IsError(oRng.Cells(loArr, 1)) Then\n'      str2 = oRng.Cells(loArr, 1)\n'     Else\n'      'VBA Error Handling\n'      str2 = VbaErrorCell(oRng.Cells(loArr, 1))\n'    End If\n'    str1 = str1 &amp; vbCrLf &amp; str2\n'  Next\n'  Debug.Print str1\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  'Status\n    'The resulting data has been pasted from SmallArray to the resulting\n    'column in the worksheet.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\nEnd Sub\n'-------------------------------------------------------------------------------\nFunction VbaErrorCell(rCell As Range) As String\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n'Description\n  'Converts a VBA error (variant) IN A RANGE to an Excel error value (string).\n'Arguments\n  'rCell\n    'A cell range with a possible VBA error.\n      'If cell range contains more than one cell, the first cell is used.\n'Returns\n  'An Excel error value (string) if the cell contains an error value, \"\" if not.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  Const cVErrLeft As String = \"Error 20\" 'Debug VBA Error Variable\n  Const cStrNewError As String = \"New Error. Update this Function!\"\n  Const cStrNoError As String = \"\"\n\n''''''''''''''''''''''''''''''''''''''''\n  Dim strCStr As String 'The rCell Value Converted to a String\n  Dim strRes As String 'One of the Excel Cell Error Values\n\n''''''''''''''''''''''''''''''''''''''''\n  strCStr = Left(CStr(rCell(1, 1)), Len(cVErrLeft))\n  If strCStr = cVErrLeft Then\n    Select Case Right(CStr(rCell), 2)\n      Case \"00\": strRes = \"#NULL!\"\n      Case \"07\": strRes = \"#DIV\/0!\"\n      Case \"15\": strRes = \"#VALUE!\"\n      Case \"23\": strRes = \"#REF!\"\n      Case \"29\": strRes = \"#NAME?\"\n      Case \"36\": strRes = \"#NUM!\"\n      Case \"42\": strRes = \"#N\/A\"\n      Case Else: strRes = cStrNewError 'New Error.\n    End Select\n   Else\n     strRes = cStrNoError 'Not a VBA Error\n  End If\n  VbaErrorCell = strRes\n\n''''''''''''''''''''''''''''''''''''''''\nEnd Function\n'-------------------------------------------------------------------------------\nFunction VbaErrorString(strString As Variant) As String\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n'Description\n  'Converts a VBA error (variant) IN A STRING to an Excel error value (string).\n'Arguments\n  'strString\n    'A string with a possible VBA Error.\n'Returns\n  'An Excel error value (string) if the cell contains an error value, \"\" if not.\n\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n  Const cVErrLeft As String = \"Error 20\" 'Debug VBA Error Variable\n  Const cStrNewError As String = \"New Error. Update this Function!\"\n  Const cStrNoError As String = \"\"\n\n''''''''''''''''''''''''''''''''''''''''\n  Dim strCStr As String 'The strString Value Converted to a String\n  Dim strRes As String 'One of the Excel Cell Error Values\n\n''''''''''''''''''''''''''''''''''''''''\n  strCStr = Left(CStr(strString), Len(cVErrLeft))\n  If strCStr = cVErrLeft Then\n    Select Case Right(CStr(strString), 2)\n      Case \"00\": strRes = \"#NULL!\"\n      Case \"07\": strRes = \"#DIV\/0!\"\n      Case \"15\": strRes = \"#VALUE!\"\n      Case \"23\": strRes = \"#REF!\"\n      Case \"29\": strRes = \"#NAME?\"\n      Case \"36\": strRes = \"#NUM!\"\n      Case \"42\": strRes = \"#N\/A\"\n      Case Else: strRes = cStrNewError 'New Error.\n    End Select\n   Else\n     strRes = cStrNoError 'Not a VBA Error\n  End If\n  VbaErrorString = strRes\n\n''''''''''''''''''''''''''''''''''''''''\nEnd Function\n'-------------------------------------------------------------------------------\n<\/code><\/pre>\n<p>Additionally in view of automation to update the cells automatically, you might want to put the following code into the sheets code window:<\/p>\n<pre><code>Option Explicit\nPrivate Sub Worksheet_SelectionChange(ByVal Target As Range)\n  XthColumnResult\nEnd Sub\n<\/code><\/pre>\n<p>The ideal solution should be with the Change event, but it throws the &#8216;Run-time error 28: Out of stack space&#8217;, so I used the SelectionChange event instead.<br \/>\nThe only drawback I could find was that when you delete a cell with &#8216;del&#8217; the value in the third column isn&#8217;t updated before you move out of the cell.<br \/>\nAs always sorry for the &#8216;overcommenting&#8217;.<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">2<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Handling the infamous VBA Errors (2042) successfully!? Before using this code be sure you have studied at least the customize section carefully or you might lose data. Most importantly the second column must always be adjacent to the right of the first column, otherwise this code couldn&#8217;t have been done with the &#8216;array copy-paste &#8230; <a title=\"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\" aria-label=\"More on [Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[400,401],"class_list":["post-31069","post","type-post","status-publish","format-standard","hentry","category-solved","tag-excel","tag-vba"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Handling the infamous VBA Errors (2042) successfully!? Before using this code be sure you have studied at least the customize section carefully or you might lose data. Most importantly the second column must always be adjacent to the right of the first column, otherwise this code couldn&#8217;t have been done with the &#8216;array copy-paste ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-19T01:42:35+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA\",\"datePublished\":\"2023-01-19T01:42:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\"},\"wordCount\":207,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"excel\",\"vba\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\",\"name\":\"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2023-01-19T01:42:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA - JassWeb","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:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA - JassWeb","og_description":"[ad_1] Handling the infamous VBA Errors (2042) successfully!? Before using this code be sure you have studied at least the customize section carefully or you might lose data. Most importantly the second column must always be adjacent to the right of the first column, otherwise this code couldn&#8217;t have been done with the &#8216;array copy-paste ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/","og_site_name":"JassWeb","article_published_time":"2023-01-19T01:42:35+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA","datePublished":"2023-01-19T01:42:35+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/"},"wordCount":207,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["excel","vba"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/","url":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/","name":"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2023-01-19T01:42:35+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-calculating-new-cells-containing-true-false-outputs-from-cells-also-containing-n-a-values-using-vba\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] Calculating new cells containing True\/False outputs from cells also containing #N\/A values using VBA"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/31069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=31069"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/31069\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=31069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=31069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=31069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}