Filling a cell from a Macro

  • Thread starter Thread starter Just Merks
  • Start date Start date
J

Just Merks

Hello,

I want to put a IF formula from a Macro. IE. cell= "=IF(a=b,"yes","no")"

However this give an error on the " sign. How to proceed?

regards,

Just
 
You need to double up on the " marks around the strings yes and no

Range("C1").Formula = "=IF(A1=B1,""yes"",""no"")"


Gord Dibben MS Excel MVP
 
Back
Top