LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default inserting formulae

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto fill formulae when inserting rows Riker1074 Excel Discussion (Misc queries) 9 December 30th 08 03:56 PM
Inserting worksheet makes formulae stop working Mark Excel Discussion (Misc queries) 5 April 24th 08 07:10 PM
Inserting new row but keeping formulae Alex Simpson Excel Worksheet Functions 0 August 8th 06 01:16 PM
inserting formulae [email protected] Excel Worksheet Functions 2 May 9th 06 02:08 PM
Subtotals and inserting formulae jandro Excel Programming 4 July 26th 05 02:50 PM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"