Forum Discussion
Vlookup returning random #NAs, Randcom Correct Responses
I have a multi-sheet workbook, with a named array of data. On a separate sheet I cite a first-column text of that named array, to extract datum from a column on that specific row. In other words, "VLookup."
Maddeningly, there are some instances where the use of one of the text-strings in the array, produces an "NA" error. I can't figure this out, because I have:
--Checked to make sure the named array covers the fields to which the Vlookup refers.
--Checked (using "EXACT," "Cell=Cell," even simply copying the value from the named array into the formula) to make sure there are no common text/formating/other discrepancies between the citation and the cited cell.
--Checked (redundantly) to make sure the cited cell DOES exist in the array.
--Tried with other citations (some of which always work, some of which always do not.
I will post/attach the file. Please note, the workbook is being developed, and so it's somewhat disorganized, but the two pertinent worksheets are "1 GenReservation Data" & "2 AvailabilityCalendar" The cell in question is in the "2 Availability Calendar", C17. This cell uses the results of B17 as the "Lookup Value" in the array titled "AE01_ReservationInfo." While there might be some thing caused by the formula in B17, it doesn't seem so: As you can see by some attempts by me to figure out the error, I've created a simple stripped-down Vlookup formula to resolve the problem, and the same thing happens, even if I simply copy from the Array the text that Vlookup must look up. I've also used other citations from the "1 GenReservation Data" page both directly and in the formula and they often work.
For example, using, (either directly or derived via formula) the text "Farquar 2026-0415" or "Johnsonite 2025-0115" never work. But all the others do.
Thanks for your ideas on this one!
Sorry, this is my first posting, and I cannot see how to attach the file. Assumed that would be obvious (and maybe it is, but not to me :( ) So if you can help with that issue, I'll be able to provide a better context. But I'll try to include a table to illustrate the issue, even though that will only show .
...and that didn't work either. Claimed my table had invalid HTML and told me to remove tags...which I don't know how to do. Thanks for your help, either way.
Thanks for the advice, especially about the Xlookup. For some reason, the formula now works. (Same formula as before!) Very mysterious; would love to have some ideas how/why this glitchy period happened in case it happens again. But for now, I'll call the problem (the formula) solved, even though the real problem for me was not understanding why such a result would occur so serendipitously!
2 Replies
- RichardH4Copper Contributor
Thanks for the advice, especially about the Xlookup. For some reason, the formula now works. (Same formula as before!) Very mysterious; would love to have some ideas how/why this glitchy period happened in case it happens again. But for now, I'll call the problem (the formula) solved, even though the real problem for me was not understanding why such a result would occur so serendipitously!
- m_tarlerBronze Contributor
yes unfortunately it does prevent posting files of new members and can be glitchy. That said you can share a link to a web hosted version of the sheet (e.g. one drive or google drive)
as for the problem you mention using vlookup but are you specifying exact match (a 0 at the end)?
also consider using XLOOKUP