Hi, as usual I've inherited a workbook which I have been adding some VBA to, however when trying to add a formula into VBA i'm getting a resultant #NAME? error in the cell
If I paste the formula directly into the cell it works. It's purpose is to put decimal between the digits, so 77 becomes 7.7 and 199 becomes 1.9.9 and so on.
All help greatly appreciated
Code:
ActiveCell.FormaulR1C1 = "=F(VALUE(M2)<100,LEFT(M2,1)&CHAR(46)&RIGHT(M2,1),LEFT(M2,1)&CHAR(46)&MID(M2,2,1)&CHAR(46)&RIGHT(M2,1))"
If I paste the formula directly into the cell it works. It's purpose is to put decimal between the digits, so 77 becomes 7.7 and 199 becomes 1.9.9 and so on.
All help greatly appreciated