Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Formula error when created via VBA

This is my issue: I was finally able to input a formula into sheets by the range.formula property. The formula is properly displayed (it's a very easy "=SUM(C1;C10)") but returns an #ERROR. When I parse it through the Error's information menu, it says that it's SUM to cause the problem. identical formula works fine when input manually, but the bauty is that if I copy from the sheet's correct formula and paste it into tne range.formula property is stops working once pasted! :o(

the real cell content is as follows (soz, it's in italian)

=somma(C1:C9)

I couldn't find any trailing hidden characters.
Any idea?
Thank you for your time!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Formula error when created via VBA

Ciao Max,

Am Mon, 7 Jan 2013 16:39:54 +0000 schrieb Max Woland:

This is my issue: I was finally able to input a formula into sheets by
the range.formula property. The formula is properly displayed (it's a
very easy "=SUM(C1;C10)") but returns an #ERROR.


VBA speaks english. If you want to sum C1:C10 then
[A1].Formula = "=Sum(C1:C10)"
IF you want to sum C1 and C10 then
[A2].Formula = "=Sum(C1,C10)"
If you want the italian formula then:
[A1].FormulaLocal = "=Somma(C1:C10)"


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Formula error when created via VBA

Max Woland wrote:
This is my issue: I was finally able to input a formula into sheets by
the range.formula property. The formula is properly displayed (it's a
very easy "=SUM(C1;C10)")


; or : ?


but returns an #ERROR. When I parse it through
the Error's information menu, it says that it's SUM to cause the
problem. identical formula works fine when input manually, but the bauty
is that if I copy from the sheet's correct formula and paste it into tne
range.formula property is stops working once pasted! :o(

the real cell content is as follows (soz, it's in italian)

=somma(C1:C9)

I couldn't find any trailing hidden characters.
Any idea?
Thank you for your time!





type your formula manually, select that cell and in vbe in immediate
window display it.

? activecell.formula

then compare with formula in your code.


remember that .formula = .... accepts formulas in English only.


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
2003 created Workbook casuses error when macro runs in 2007 Corey .... Excel Programming 2 February 6th 09 07:17 PM
Error on windows xp with a macro created in excel 2000 and windows2000 none[_3_] Excel Programming 0 April 9th 08 08:52 AM
Error when Execute New Procedure Created Using VBE Resant Excel Programming 3 September 8th 06 09:04 AM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
cannot open excel file - error log created Joe Excel Discussion (Misc queries) 3 June 6th 05 10:43 PM


All times are GMT +1. The time now is 10:22 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"