Q:

Use an Excel formula in Crystal then export the report to Excel

Here's the scenerio.
I have a report that is grabbing daily counts from the previous 6 days. I'm recreating an excel spreadsheet and automating it. The excel sheet has a VLOOKUP function that grabs data from another excel spreadsheet. What I'm looking to do is use this excel VLOOKUP function to reference other cells just like the other report. 
Here's a snippet of the report:
Part#       DESC      DAY1_Count  DAY2_Count
    2       Spoon              1           3
    7       Fork               5          11

Here's what I'm looking to do. This report will be exported to an excel spreadsheet:
Part#       DESC      DAY1_Count  DAY2_Count   Sold_Count
    2       Spoon              1           3   =VLOOKUP(A2,\\server\location\excel.xlsx)
    7       Fork               5          11   =VLOOKUP(A3,\\server\location\excel.xlsx)

I'd like to loop the cell reference (A2, A3, A4) until it hits the last part # but I'm a little unsure how to do that. Is what I want to do possible? Let me know if anything isn't clear.
EDIT: I think I just answered my own question. I used a crystal formula to insert the excel function as text. When I export to excel the formula is there, but only as plain text. Any way to get this to automatically enter in? I might be asking for a little much here, but it's worth a try :)

A:

The simplest way I know to get a Crystal text field converted to a formula in Excel is to precede the = with a ' at the start of the text in Crystal, then do a global replace on '= to = in Excel after exporting the output to it.
So if your existing Crystal formula is:
"=VLOOKUP(A" & CStr (RecordNumber+1,'#') & ",\\server\location\excel.xlsx)"

- then change it to:
"'=VLOOKUP(A" & CStr (RecordNumber+1,'#') & ",\\server\location\excel.xlsx)"

and after exporting the output to Excel, do a global replace on '= to = in Excel.

