Posted to microsoft.public.excel.programming
|
|
Input formula into a column via macro
Hi Papyjac
Would you elaborate, I don't understand it
regards, francis
"Papyjac" wrote:
Hello Franciz,
I do not code the formula in VB, but I stocke the formula in the Sheet, for
exemple in Line 1 (same column)
next I copie this formula in the column
With this technique, your code is indépendant of the formula
--
P a p y j a c
"franciz" a écrit dans le message de
...
Hi Tim
There is an error upon running the code. Error message : Run Time Error
"1004"
and this is highlighted : Range("P2").Formula = f
thanks
regards, francis
"Tim Zych" wrote:
Dim f As String
f =
"=INDEX([FXAppl.xls]Sheet1!$C$1:$C$100,MATCH(LEFT(Sheet3!A1,4)&""*"",[FXAppl.xls]Sheet1!$B$1:$B$100,0))"
Range("P1").Formula = f
Then if you want to copy it:
Range("P1").Copy
Range("P2:P1000").PasteSpecial xlPasteFormulas
Application.CutCopyMode = False
--
Tim Zych
www.higherdata.com
Compare data in workbooks and find differences with Workbook Compare
A free, powerful, flexible Excel utility
"franciz" wrote in message
...
Hi
How can I input this formula into col P via a macro
=INDEX([FXAppl.xls]Sheet1!$C$1:$C$100,MATCH(LEFT(Sheet3!A1,4)&"*",[FXAppl.xls]Sheet1!$B$1:$B$100,0))
thanks
regards, francis
|