# Using ODBC with Excel **Category:** [Yahoo Archive](https://www.epiusers.help/c/yahoo-archive/9) **Created:** 2001-01-11 12:42 UTC **Views:** 343 **Replies:** 1 **URL:** https://www.epiusers.help/t/using-odbc-with-excel/1930 --- ## Post #1 by @system
"If the number of open quotes changes when I refresh the data in sheet
3, the formulas in each cell on sheet 1 permanently change to
=sheet3!#REF! because there is no longer any data in the corresponding
cell in sheet 3."

A "#REF!" error occurs when an entire row or column is deleted, not just the
contents. Make sure your macro is clearing cell contents instead of
deleting columns/rows. To make sheet 1 cleaner, you can change to formula
to "=if(sheet3!a1 ="","",sheet3!a1). This way, if the cells in sheet 3 are
empty, nothing will be displayed on sheet 1.

HTH
Danice
--- ## Post #2 by @system
I created an Excel workbook that has an ODBC query in sheet 3, with
Vantage Open Quote information loading into each column.

I have the columns in sheet 1 linked to a corresponding column in
sheet 3 using the =sheet3!a1 formula for each cell.

If the number of open quotes changes when I refresh the data in sheet
3, the formulas in each cell on sheet 1 permanently change to
=sheet3!#REF! because there is no longer any data in the corresponding
cell in sheet 3.

Is there a better way to link the cells in sheet 1 to sheet 3 so I
don't lose my formulas when the data is refreshed?

Thanks,
Brad
--- **Canonical:** https://www.epiusers.help/t/using-odbc-with-excel/1930 **Original content:** https://www.epiusers.help/t/using-odbc-with-excel/1930