Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
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

Reply
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
Using the results of formulae between different spreadsheets. PeterNocon Excel Worksheet Functions 1 February 5th 06 07:03 PM
Change to formulae Emma Hope Excel Worksheet Functions 3 September 5th 05 09:16 PM
Maintaining cell references when inserting cells elsewhere Stephen Jefferson Excel Discussion (Misc queries) 3 August 5th 05 09:30 PM
Searching TEXT in formulae, rather than results of formulae AndyE Excel Worksheet Functions 1 July 15th 05 10:57 AM
XL2002 Clipboard doesn't paste formulae Jonathan Excel Discussion (Misc queries) 2 May 23rd 05 12:17 PM


All times are GMT +1. The time now is 11:54 AM.

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

About Us

"It's about Microsoft Excel"