Calculation on data from SQL database sing MS Quwry

  • Thread starter Thread starter Cesar
  • Start date Start date
C

Cesar

Hi all,

I'm pulling data from a SQL database using MS Query in Excel, I have
filters or criteria on the query before to bring the data to excel. Once in
excel I am creating new columns by using the data just retrieved. The problem
is when I change my criteria, ( in this case I am using Date range), the
values on the new columns shows #REF!. Being more especific, if the 1st time
I retrieved let say 20 rows, then my new columns calulate the new 20 values,
but next time I retrieve data using a new value in the criteria I got let
say, 30 rows but in my calculated new columns I got values up to the raw 20
but from there up to the raw 30 I got #REF!.
 
The #REF is being caused by a worksheet formula the can't find a reference.
You need to debug the formula. the way I normally debug a formaul is to use
the Evalaute formula tool. click on one of the cells with the error then
from worksheet menu

Tools - formula Auditing - Evaluate Formula.

Post the formula if you need help. If you are creating the formula from VBA
code also include the code that writes the formula.
 
Back
Top