From: mark on
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
From: Jeff Boyce on
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" <mark(a)discussions.microsoft.com> wrote in message
news:497A67C6-21F5-4D2E-A21E-F69EE3E8EB55(a)microsoft.com...
> 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


From: NG on
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