vba - Excel adding an ' to the beginning of all my cells (APOSTROPHE being magically added) -
with thisworkbook.sheets("worksheetname").cells.range("a1:a1000000") .formula = formulavariable .value = .value end
when excel .value=.value adds ' beginning of values. if right click , paste value removes '. problem code extremely efficient , takes less 1 second when try remove ' takes forever load cells.
give try:
sub testit() formulavariable = "=1+2" thisworkbook.sheets("worksheetname").cells.range("a1:a1000000") .clear .formula = formulavariable .value = .value end end sub
edit
if wish fill cells null then:
sub fillwithnulls() formulavariable = chr(61) & chr(34) & chr(34) thisworkbook.sheets("worksheetname").cells.range("a1:a1000000") .clear .formula = formulavariable .value = .value end end sub
Comments
Post a Comment