trying to write ' " ' into an activeCell using VBA

  • Thread starter Thread starter ornit
  • Start date Start date
O

ornit

Hi all
I need help:
I am trying to write this value (actually it's a function) to a
ActiveCell in excel:
=IF(master!A10=0,"" ,master!A10)
but the VBA ignores the (") and the function is copied the wrong way.
I tried the code:
Range("A10").Value = "=IF(master!A10=0,"" ,master!A10)"
but it didn't work.
please help me....
thanks - Orni
 
Try this:

Range("L9").Value = "=IF(master!A10=0,"""" ,master!A10)"

There's 4 double quotes in there. With some special characters, yo
need to repeat them to make excel know you really want to put the
there...
 
Ornit

Range("A10").Value = "=IF(master!A10=0,"""" ,master!A10)"

Regards

Trevor
 

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

Back
Top