View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Learning Excel VBA

Always helps to try to explain what you mean in the original post.

Range("MF") = Range("frm1").Formula

--
Don Guillett
SalesAid Software

"Maurizio" wrote in message
...
Perhaps I didn't explain it clearly.
FRM1 is a named cell that contains something (inserted from previous macro
coding) like

LEFT(A43;5)

I need to assign it as a formula to all the cells of range MF that should
contain

=LEFT(A43,5)
Maurizio

"Tom Ogilvy" wrote:

Assuming Range("FRM1") contains the string ABC.

You want to produce something like

="ABC"

as written you produce

=ABC

Which makes excel look for a defined name ABC.
try

Range("MF").Formula = "=""" & Range("FRM1").Text & """"


--
Regards,
Tom Ogilvy


"Maurizio" wrote in message
...
Please, would someone help me understand VBA?
What' wrong in the following statement:?

Range("MF").Formula = "=" & Range("FRM1").Text

the foloowing works correctly:

Range("MF").Formula = Range("FRM1").Text

Thanks for your time. Maurizio