Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Calculation on data from SQL database sing MS Quwry

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!.
--
Cesar
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Calculation on data from SQL database sing MS Quwry

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.

"Cesar" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Try to change $ sing to £ sign on a sales invoice bea Excel Discussion (Misc queries) 2 February 7th 10 06:31 PM
Database query and calculation Cesar Excel Programming 2 October 28th 08 04:46 PM
Excel or database program calculation? Paul Excel Discussion (Misc queries) 3 February 13th 08 02:58 AM
locate duplicates by sing conditional formatting--doesn't work for kewawoman Excel Discussion (Misc queries) 2 September 1st 05 01:39 PM
Open another program sing VBA Rob Excel Discussion (Misc queries) 10 March 29th 05 11:09 AM


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"