A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

export query with formulas to excel



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 06:23 PM posted to microsoft.public.access.queries
Mark
external usenet poster
 
Posts: 1,534
Default export query with formulas to excel

Is there a way to export my Access query to Excel 2003 while keeping the
formulas in Excel. For example, in my Access query I have a field called
"Other" which is defined as the following:

Other: [DiffTotal]-[BudTo]

[DiffTotal] and [BudTo] are "real" fields in the query and become columns in
Excel. Instead of having the value of "Other" appear in Excel, I'd like the
"Other" column to have the formula where, for example in row 1, it could look
like "=A3-A2."

Thanks,

~Mark
  #2  
Old April 19th, 2010, 06:35 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default export query with formulas to excel

When Access exports to Excel, it exports the data, not the formula.

If you are willing to undertake the work of automating Excel, you can use
Access to "push" a formula into Excel.

If you want [DiffTotal] and [BudTo] amounts to go to Excel, send them, then
in Excel, create your formula.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"mark" wrote in message
...
Is there a way to export my Access query to Excel 2003 while keeping the
formulas in Excel. For example, in my Access query I have a field called
"Other" which is defined as the following:

Other: [DiffTotal]-[BudTo]

[DiffTotal] and [BudTo] are "real" fields in the query and become columns
in
Excel. Instead of having the value of "Other" appear in Excel, I'd like
the
"Other" column to have the formula where, for example in row 1, it could
look
like "=A3-A2."

Thanks,

~Mark



  #3  
Old April 19th, 2010, 06:55 PM posted to microsoft.public.access.queries
NG[_2_]
external usenet poster
 
Posts: 59
Default export query with formulas to excel

Hi Mark,

It is possible, but the only thing I can come up with is to export the data
without the calculated field to Excel, and then using the excel application
object in Access VBA to open the created workbook, add a column and fill it
with the formula.
--
Kind regards
Noƫlla


"mark" wrote:

Is there a way to export my Access query to Excel 2003 while keeping the
formulas in Excel. For example, in my Access query I have a field called
"Other" which is defined as the following:

Other: [DiffTotal]-[BudTo]

[DiffTotal] and [BudTo] are "real" fields in the query and become columns in
Excel. Instead of having the value of "Other" appear in Excel, I'd like the
"Other" column to have the formula where, for example in row 1, it could look
like "=A3-A2."

Thanks,

~Mark

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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