formula

  • Thread starter Thread starter marta
  • Start date Start date
M

marta

Hello,
My macro contains the following formula:
With Worksheets("Entry Form").Range("K7")
.Formula = "=IF(ISBLANK(J7),"",AD7)"
End With
When i try to run it, it gives me a run-time error
(Application-defined or object-defined error).
What am i doing wrong?

Thanks for your help
Marta
 
Hi
try
With Worksheets("Entry Form").Range("K7")
.Formula = "=IF(ISBLANK(J7),"""",AD7)"
 
When you have embedded quotes in the formula, you must "double" them. The line
should read

.Formula = "=IF(ISBLANK(J7),"""",AD7)"
 
thank you!
-----Original Message-----
When you have embedded quotes in the formula, you must "double" them. The line
should read

.Formula = "=IF(ISBLANK(J7),"""",AD7)"




.
 

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