Calculation on data from SQL database sing MS Quwry

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!.
 
J

Joel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top