Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am a novice in programming excel. I am trying to insert formula
through macro in a cell by using Formulaarray. I am encountering a peculiar problem. Formula i want to insert is =-IF(UPPER($EC$14)="Y",AH22*AI22,AN22)*R22*SUMIF(PAY MENT_INDEX,"=" &F22,RNG_OPT_PREM)/COUNTIF(PAYMENT_INDEX,&F22) Now if i want to insert it in A1 say, i would write A1.formulaArray = "=-IF(UPPER($EC$14)="Y",AH22*AI22,AN22)*R22*SUMIF(PAY MENT_INDEX,"=" &F22,RNG_OPT_PREM)/COUNTIF(PAYMENT_INDEX,&F22)" But VBA recognizes the starting inverted commas of the "Y" as the end of formula and gives me syntax error. How do i overcome this? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto fill formulae when inserting rows | Excel Discussion (Misc queries) | |||
Inserting worksheet makes formulae stop working | Excel Discussion (Misc queries) | |||
Inserting new row but keeping formulae | Excel Worksheet Functions | |||
inserting formulae | Excel Worksheet Functions | |||
Subtotals and inserting formulae | Excel Programming |