excel - VBA Set Cell value to text containing ' not working -
i'm trying macro type out heap of formulae me. formula goes this:
=countif('other_sheet'!a:a,"hello*")
the user can specify , other_sheet, select cell , go
activecell.value = "=countif('" & othercell & "'!" & column & ":" & _ column & """,hello*"")"
but keeps giving me errors like:
1004: object defined error
i have tried using activecell.text
, activecell.formula
etc. , don't work.
it needs activecell.formula
, ",
wrong way around next hello
. should be:
activecell.formula= "=countif('" & othercell & "'!" & column _ & ":" & column & ",""hello*"")"
Comments
Post a Comment