LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Avoiding #Value errors when referencing DB Tables

I have worksheet that has about 10 columns of data returned from a SQL DB
query.
On the right side of the DB query is a column for Quantitys, and on the
right of the DB query I have some formulas that calculate the cost, MSRP and
other pricing models. It all works well. The formulas that calculate the
pricing model is:

=B2427*Table_Query_from_commissions[[#This Row],[MFRPrice]]
etc

The problem is that the DB query will return more and more rows as products
are added to our CRM database. When I just copy the formulas down from the
worksheet,
=B2427*Table_Query_from_commissions[[#This Row],[MFRPrice]]
If there is no data in #This Row, then I get #Value! errors, and the Summing
operations also return #Value! Errors.

By the same token, if I have 2000 rows in the query today, and 2001
tomorrow, then product number 2001 won't get used in the worksheet
calculations as the rows are not in the section of the workbook that is doing
the calculations....

Is there a way to work around this limitation and have the worksheet add the
formulas on the end if there is data in the row? As in:

If CurrentRowCurrentCell < null then
=[Column B This row]*Table_Query_from_commissions[[#This Row],[MFRPrice]]
Else 0
?

Thanks in advance.
 
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
Cross referencing on tables Rich B[_2_] Excel Discussion (Misc queries) 2 October 2nd 07 10:22 AM
Excel 2007 charting errors with pivot tables Lerxst Charts and Charting in Excel 0 December 6th 06 09:02 PM
Avoiding Errors When Attempting To Retrieve Data From A Non-existant Worksheet BloodyShrapnel Excel Worksheet Functions 1 March 24th 06 01:25 AM
Ignoring Lines with Errors in Pivot Tables Darren Excel Worksheet Functions 3 March 22nd 05 09:13 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


All times are GMT +1. The time now is 09:43 PM.

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

About Us

"It's about Microsoft Excel"