[AccessD] Programmatically change cell formulae in Ecel

Hale, Jim Jim.Hale at FleetPride.com
Wed Nov 28 15:12:52 CST 2007


Arthur,
This works for me, ie it places the formula in cell E6 correctly
 strFormula = "=VLOOKUP(A6,'C:\Documents and Settings\jhale\My Documents\[file1.xls]OutPut_Data'!$B$3:$C$100,2,TRUE)"
Range("E6").Formula = strFormula

HOWEVER if the cell E6 is formatted as text then it the sub pastes it in as a  text string. Check the cell formatting
Jim Hale

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Wednesday, November 28, 2007 2:54 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Programmatically change cell formulae in Ecel

What's the R1C1 for, Jurgen?

Arthur

On Nov 28, 2007 3:17 PM, Jurgen Welz <jwelz at hotmail.com> wrote:

>
> Arthur:
>
> Here is an example from code I use where M refers to a named range cell in
> a sheet:
>
>                .Cells(14, 4).Select                .ActiveCell.FormulaR1C1
> = "=IF(M=0,Tender!RC[-1],Tender!RC[-1]*Tender!RC[11])"



> CiaoJürgen WelzEdmonton
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.




More information about the AccessD mailing list