#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default FORMULA

The following statement gives an application error. Any suggestions why?

Range("$I$13").Formula = "=IF($I$11=$AL$1;$AM$1;$AM$2)"

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default FORMULA

VBA uses US english notation so change the semicolons to commas
Range("$I$13").Formula = "=IF($I$11=$AL$1,$AM$1,$AM$2)"

or if this above formula would be accepted in a cell, then use FormulaLocal

Range("$I$13").FormulaLocal = "=IF($I$11=$AL$1;$AM$1;$AM$2)"

--
Regards,
Tom Ogilvy

"ojv" wrote in message
...
The following statement gives an application error. Any suggestions why?

Range("$I$13").Formula = "=IF($I$11=$AL$1;$AM$1;$AM$2)"

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default FORMULA

Makes my afternoon. Thx a lot.

ojv

"Tom Ogilvy" wrote:

VBA uses US english notation so change the semicolons to commas
Range("$I$13").Formula = "=IF($I$11=$AL$1,$AM$1,$AM$2)"

or if this above formula would be accepted in a cell, then use FormulaLocal

Range("$I$13").FormulaLocal = "=IF($I$11=$AL$1;$AM$1;$AM$2)"

--
Regards,
Tom Ogilvy

"ojv" wrote in message
...
The following statement gives an application error. Any suggestions why?

Range("$I$13").Formula = "=IF($I$11=$AL$1;$AM$1;$AM$2)"

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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 01:17 AM.

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"