A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
ToneML wrote:
I'm in Workbook 2, looking up information from Workbook 1, and the response in the cell is this =VLOOKUP(A3,'C:\Users\user\Documents\xxxxxx\Sales Reports[Item Listing at 30th May 2013.xlsx]Sheet1'!$A$2:$G$2146,7,FALSE), instead of the number 446 as it should be. I've found a work around by checking the cell format and find it reads Text, so I change it to Number and re-do the process. When I reopen the VLOOKUP dialog box the parameters are still there so I click OK and the problem is fixed.
[....]
Why is all this happening, and how to prevent it? The origin of the two workbooks is an accounting program where I export Sales and Stock reports to Excel to create a monthly analysis.
The problem seems to be the cell that contains the VLOOKUP formula, not the data that is in the "Item Listing at 30th may 2013.xlsx" workbook.
It appears that the cell containing the VLOOKUP formula is incorrectly formatted as Text when the formula is entered. Consequently, the "formula" is interpreted as text, not a formula.
Simply changing the cell format does not immediately change the type of cell contents. The "formula" is still interpreted as text. But by "re-entering" the formula -- either by pressing F2, then Enter or by clicking on "fx" to open the function dialog box as you do -- the cell contents are re-interpreted, this time as a bona fide formula.
How to avoid that? "Don't do that"! ;-) (Old vaudeville joke.)
You say the two workbooks are created by an accounting program. Does that mean the accounting program is creating the workbook and the VLOOKUP from scratch?
If that is the case, your only remedy is to get some tech support from the suppliers of the accounting program.
([EDIT] That is, your "only remedy" other than what you are doing already, with the procedural improvements that Vijay suggested.)
But I suspect that is not what you mean. If so, you might need to fill in some details. Bottom line: how does the cell that contains the VLOOKUP formula become formatted as Text in the first place?
We cannot answer that.