Excel #NAME? error with IFNA - excel

Strange behavior in Excel 2016 running on Windows 7.
Please refer to the screenshots below:
In Pic 1, the cell in red box shows #NAME? error. When I click "Enable Editing" on top, you can see in Pic 2, the cell shows value. Pic 3 shows the formula I'm using for this cell.
Additional information: I have multiple copies of this excel file, filled with different information. Only a few of them show this error, others display the value with no problem.
My question is, what causes this and how I can fix it?
Pic 1:
Pic 2:
Pic 3:

The IFNA function was introduced with Excel 2013. If the workbooks are being opened on computers using Excel 2010 (or earlier) the function will not work and produce a #NAME? error as Excel 2010 (or earlier) does not have IFNA as a native function. Further, if the workbooks are saved in Excel 2010 (or earlier), the #NAME? remains and will be displayed for Excel 2013 and 2016 users.
Switch to the IFERROR function which was introduced with Excel 2007 to provide wider compatibility. For the purposes of offering a default value in the case of no match to the lookup, they operate exactly the same way. The IFNA is only useful to isolate errors that are not #N/A.

Related

Excel cell is magically populated with formula after another cell gets data entered

Some mysterious behavior within a simple worksheet (Excel 2013 - Win7, but also continues if workbook is opened on Excel 2019 - Win10):
Cells in column "A" are getting populated with a formula after I enter a number in cell of column "C".
For example:
When I enter the number 123456 in C23, the following is automatically entered into a previously blank A23: =HYPERLINK("http://gigapan.com/gigapans/"&C23,C23) which is what I want, but how is it happening automatically? There are NO conditional formattings (that I can find), NO Worksheet_Change VBA subs running (NO VBA code at all for this workbook). The result is what I want, but it is driving me crazy not knowing how it got set up this way!!! Took the xlsx file to another computer with no Personal.xlsb to interfere and same behavior. Suggestions?
Excel example screenshot...
This is normal behaviour, controlled by the option Advanced > Extend data range formats and formulas. Described at https://support.microsoft.com/en-us/office/advanced-options-33244b32-fe79-4579-91a6-48b3be0377c4

VLOOKUP function not working on Excel 2019 on Mac

I am just trying to merge two Excels using VLOOKUP function as it is explained on Microsoft Office documentation.
Using Microsoft Excel 2019, after typing = I can't see the function, and even I introduce the formula manually, I get an error that is not ok. I am just using:
=VLOOKUP(A2,list,5,FALSE)
Where the variable list is just the selection on the second sheet where it has to find for the data. Already checked this solution with no result. Any advice?

Excel crashes on Direct Input - Excel (VBA)

I have a strange bug problem where excel keeps crashing when I simply input a value in a Table cell not range.
More Illustration on the problem:
I made a workbook (Shorthand: WB) full of codes using (MS Excel 2010), the WB have more than 15 sheets and lots of tables and defined names; each sheet has at least 1 table.Everything works fine, now, when I tried the WB on (MS Excel 2016) some sheets causes the application to crash when I input values (e.g. 10,20,A,B, ... , etc) in table cells, not a normal range, but when I input my value as formula (e.g. =10) everything is fine, also I have tried entering the values in an empty range then copying them to the table cells and this works fine.
At first I suspected that it has something to do with the missing reference as I was using OWC11 in the PC with (MS Excel 2010) and it was not there on the PC with (MS Excel 2016) so I installed but the problem is still there.
Also, for info I tried the WB on multiple PCs with (MS Excel 2013 & 2016)
I really can't find any logical reason for this crash.
EDIT:
I tried adding data validation to the cell causing the crash then remove it and I was surprised that the crash was gone !!!

Apache POI 3.x - Logical formula resulting in #VALUE! (error) only in MS Excel 2010

I've developed a code that creates a XLS file using Apache POI 3.9.
The sheet has two columns that contains only boolean values, as shown below:
The generated XLS file was opened using a MS Excel 2010 in Portuguese (pt-BR), thus consider VERDADEIRO as TRUE and FALSO as FALSE. The 3rd column contains the formula INT(AND(L2,NOT(M2)))
varying references L2 and M2 for each row. This formula is a logical expression that has its result converted to integer. However, when the file is opened using MS Excel 2010 the formula results in error (represented by #VALUE!). I've tested the same file using OpenOffice Calc, LibreOffice Calc and MS Excel 2011 for Mac and it worked fine for both of them.
The error disappeared and the correct value was displayed when I pressed F2 and then hit Enter for each cell.
I changed the formula adding parenthesis around the function call NOT(M2)
INT(AND(L2,NOT(M2))) ====> INT(AND(L2,(NOT(M2)))) and the problem was solved.

Array Formulas in Conditional Formatting of Excel XML Spreadsheet files?

Excel usually treats Conditional Formatting formulas as if they are array formulas, except when loading them from an Excel 2002/2003 XML Spreadsheet file.
This is only an issue with the Excel 2002/2003 XML Spreadsheet format... the native Excel format works fine, as does the newer Excel 2007 XML format (xlsx).
After loading the spreadsheet, it is possible to make it work correctly by selecting the formatted range, going to the Conditional Formatting dialog, and clicking OK--but this only fixes the problem for the session.
Test case:
Enter the following into a new sheet:
A B C
1 N N N
2 x x x
3 x x x
Create this conditional format formula on cells A1:C1 (your choice of pretty colors for the format):
=(SUM(($A1:$C1="N")*($A$2:$C$2=A$3))>0)
This is an array formula that activates for A1, B1, and C1 whenever any of them has an "N" and the cell in row 2 below the "N" is equal to the cell in row 3 of the current column.
(This has been simplified from a real-world business spreadsheet. Sorry for the complexity of the test case, I am trying to find an easier test case to present here.)
And it works... you can alter the N's or the x's in any way you want and the formatting works just fine.
Save this as an XML Spreadsheet. Close Excel, and re-open the file. Formatting is now broken. Now, you can only activate conditional formatting if A1 is an "N" and A2 is the same as A3, B3, or C3. The values of B1, B2, C1, and C2 have no effect on the formatting.
Now, select A1:C1 and look at the conditional formatting formula. Exactly the same as before. Hit OK. Conditional formatting starts working again, and will work during the entire session the file is open.
Workarounds considered:
Providing the file in native (BIFF) Excel format. Not an option, these spreadsheets are generated on the fly by a web server and this is only one of dozens of types of workbooks generated dynamically by our system.
Providing the file in the Excel 2007 native XML format (xlsx). Not an option, current user base does not have Office 2007 or the compatibility plug-in.
Asking users to select the range, enter the Conditional Formatting dialog, and hitting ok. Not an option in this case, unsophisticated users.
Asking users to open the XML spreadsheet, save as native XLS, close, and re-open the XLS file. This does not work! Formatting remains broken in the native XLS format if it was loaded broken from an XML file. If (3) above is performed before saving, the XLS file will work properly.
I ended up rewriting the conditional formatting to not use array formulas. So I guess this is "answered" to some degree, but it's still an undocumented, if obscure, bug in Excel 2002/2003's handling of XML files.
I tried to recreate the problem you describe. Here is what I found.
Could consistently recreate the
problem using Excel 2003 on Windows
XP when saving as an XML
spreadsheet.
Could not reproduce the problem
using Excel 2003 on Windows XP when
saving as a standard xls
spreadsheet.
Could not reproduce the problem
using Excel 2007 on Windows Vista
when saving the file in the native
xlsx format.
Could not reproduce the problem
using Excel 2007 on Windows Vista
when saving the file in the Excel
97-2003 xls format.
(Note: All instances of Excel and Windows are current with all Windows updates.)
I also added a simple conditional formatting formula to each test. In every case, it worked as expected after saving the file, closing Excel, and reopening the file.
So the answer seems to be to use the standard Excel 2003 file format when saving the file.
BTW, this is a very odd formatting formula. It is difficult to imagine how you would use it. It must be a very specific & unusual business case. I also have the feeling something is missing in your post. (I'm not accusing you of being dishonest – just wondering if you may have shortened the formula for readability.) If this is not the exact formula you are using, please edit your original post with the complete formula and I will be happy to revisit this issue.
You can find some tutorial videos for self studying the conditional formatting issue over the following pages:
conditional formatting

Resources