PC Review


Reply
Thread Tools Rate Thread

Calculation on data from SQL database sing MS Quwry

 
 
Cesar
Guest
Posts: n/a
 
      27th Oct 2008
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 With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      28th Oct 2008
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
svchost.exe sing all my cpu ellen0222 Windows XP General 3 11th Aug 2009 09:11 AM
sing Data Validation retired bill Microsoft Excel Programming 2 21st May 2009 07:06 PM
sing-in help Karen Microsoft Outlook Calendar 2 16th Mar 2009 07:56 PM
HELP WITH CALCULATION IN DATABASE =?Utf-8?B?bXJ3b2xsZXk=?= Microsoft Access VBA Modules 2 20th Apr 2006 09:31 PM
cant sing in2 msn janine Windows XP Messenger 5 11th Apr 2004 02:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:58 AM.