My problem occurs as a result of loading data from a .csv file into a ‘data’ sheet of my workbook.
As best as I can describe the error, an absolute cell reference in a VLOOKUP formula is changed to point to the cell just after the end of the loaded .csv data, that is, if there are 12568 entries in the .csv file, then after loading into the Data sheet, the absolute cell reference is changed from, say $A$1:$C$100000 to $A$12569:$C$100000.
For about six months, I have diligently searched for any clue to explain and/or fix this problem w/o success. Thus far, I have only found one post similar to my problem, but no solution was generated. The link to the referenced post is: Macro to import CSV file stopped working right - Ubuntu OS -LibreCalc 7.4
A simplified version of my spreadsheet – I own a portfolio of stocks. My workbook consists of two spreadsheets, FOLIO and Data. The first is a compilation of my stock symbols in the A column and the previous day’s closing price in column B. In the C column, I have a VLOOKUP formula which ‘looks up’ today’s price of each stock in column A using the new data in the Data sheet. There is a macro incorporated in the workbook which is intended to import the (external) TodayPrices.csv file into the second spreadsheet named “Data”. The VLOOKUP() function in column C of the FOLIO sheet then updates prices in column C. The VLOOKUP formulation, starting in Cell C1 on the main sheet is [ =VLOOKUP(A1,Data.$A$1:$C$1000,1,0) ]. The problem is that the (macro ?) is not supposed to modify the VLOOKUP function but, in loading the csv “data” file, the VL function is changed so that the search on the FOLIO sheet starts at the last loaded cell in the “Data” sheet instead of cell $A$1, viz., if the original csv file contained 900 names, then the VL function is changed to [ =VLOOKUP(A1,Data.$A$901:$C$1000,1,0) ]. And the main sheet then displays #N/A in all relevant cells. I realized this is an extremely long post, but I have searched the net for some clue/hint for what the cause of the apparent bug. If anyone can suggest an insight or viable debug approach, I say Thanks in Advance.