macro-written correct formula returns #NAME? and #VALUE?

S

s.a.

Hello. I'm having troubles writing an excel 2003 macro. I'm using a
line like$" & (c - 1) & ")" <<
to write the formula =SUMA($C$11:$C$12) to a cell in the "ctacte"
worksheet. (SUMA instead of SUM because I'm using a spanish version of
excel).
Problem is, when the macro finishes running, the cell, instead of
returning the value of the sum I get a #NAME? error. The odd thing
here is that if I press F2 and then ENTER on the cell, I get the
correct result. The formula doesn't get autocorrected of anything, it
is exactly the same thing that the macro returns. Only that to get the
result I need to F2-ENTER it!

Any idea of what the problem would be? I'd really appreciate it!

Thanks and forgive my bad english!
 
S

Susan

check
Tools, Options, Calculations - is it set on automatic or manual?
sometimes in a macro automatic gets set to manual & then we forget to
change it back......... next time excel opens it will be on manual
without anything being done.
hth!
susan
 
N

Norman Jones

Hi S,

Try replacing the Spanish funtion SUMA with the
Englsh equivalent Sum.

Excel will automatically translater the function into the
user''s version language.
 
S

s.a.

Unbelievable, but it worked. I forgot to mention it earlier, but
pressing F9 ("Calculate now" or whatever it is called in english)
didn't do anything, and calculations were always set to Automatic.

Why would this happen?
 
D

Dave Peterson

VBA is USA centric.

s.a. said:
Unbelievable, but it worked. I forgot to mention it earlier, but
pressing F9 ("Calculate now" or whatever it is called in english)
didn't do anything, and calculations were always set to Automatic.

Why would this happen?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top