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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -