ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Refresh produces #N?A error (https://www.excelbanter.com/excel-discussion-misc-queries/149503-refresh-produces-n-error.html)

RhysPieces

Refresh produces #N?A error
 
This question was originall posted in the Links subsection but no one took
the bait. I have two worksbooks connected via a VLOOKUP. The primary workbook
gets data
from a read-only Access table on the LAN (via an MSQuery I designed) and has
a refresh button that runs a macro to re-read the Access table. The secondary
workbook obtains the part number (far left column) and the value nine columns
to the right via VLOOKUP from the primary. When we originally designed the
VLOOKUP it worked perfectly fine. However, if the Refresh button is activated
in the primary workbook a #N/A error results in the secondary workbook
containing the VLOOKUP. The Part Number coming out of Access in formatted as
text and displays in the primary workbook as General but as Numeric in the
secondary workbook, if that means anything. Originally the primary and
secondary workbooks were in different folders, then in the same folder, and
eventually we added the primary as a separate sheet in the secondary. Still
getting #N/A. How is this fixed?


Gunnar Lysaker

Refresh produces #N?A error
 
Well, I cannot help you with the lookups via access, but its obvious that the
formula can`t find the right lookup criteria because of the different fomat
on the search string and the array. I would have used
IF(iserror(vlookup);"";vlookup)). Then you at least don't get the N/A.
G.

"RhysPieces" wrote:

This question was originall posted in the Links subsection but no one took
the bait. I have two worksbooks connected via a VLOOKUP. The primary workbook
gets data
from a read-only Access table on the LAN (via an MSQuery I designed) and has
a refresh button that runs a macro to re-read the Access table. The secondary
workbook obtains the part number (far left column) and the value nine columns
to the right via VLOOKUP from the primary. When we originally designed the
VLOOKUP it worked perfectly fine. However, if the Refresh button is activated
in the primary workbook a #N/A error results in the secondary workbook
containing the VLOOKUP. The Part Number coming out of Access in formatted as
text and displays in the primary workbook as General but as Numeric in the
secondary workbook, if that means anything. Originally the primary and
secondary workbooks were in different folders, then in the same folder, and
eventually we added the primary as a separate sheet in the secondary. Still
getting #N/A. How is this fixed?



All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com