Application-defined or object-defined error

A

Ayo

I am getting the above error message on the code line below and I can't
figure it out. MScell is a string variable that evaluates to "J".
I would appreciate any insight into this.
Thanks.
Me.Range("H6").Formula =
"=IF(TODAY()>=$B6,SUMPRODUCT(--(Actualized!$B$16:$B$1056=$B$3),--(Actualized!$" & MScell & "$16:$" & MScell & "$1056<=$B6)),"")"
 
J

Jacob Skaria

Replace the double quotes to denote blank within the formula ("") with """"

as below

Me.Range("H6").Formula =
"=IF(TODAY()>=$B6,SUMPRODUCT(--(Actualized!$B$16:$B$1056=$B$3),--(Actualized!$" & MScell & "$16:$" & MScell & "$1056<=$B6)),"""")"
 
A

Ayo

Thanks Jacob. It worked.

Jacob Skaria said:
Replace the double quotes to denote blank within the formula ("") with """"

as below

Me.Range("H6").Formula =
"=IF(TODAY()>=$B6,SUMPRODUCT(--(Actualized!$B$16:$B$1056=$B$3),--(Actualized!$" & MScell & "$16:$" & MScell & "$1056<=$B6)),"""")"
 

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

Top