Hi,
I am trying to copy a formula from one cell to another after clearing the contents but the formula changes when I copy programatically. I want the formula to stay the same.
IE:
=IF(Sheet2!$B$20="ETO",+IF(AC43=0,"",IF(AC43>0,AC4 3,"")))
IE:
IF(Sheet2!$B$20="ETO",+IF(W42=0,"",IF(W42>0,W42,"" )))
However, the original formula that was copied stays the same but once it reaches its destination it remains the same.
Code example:
Worksheets("sheet1").Range("Ae47:Af47").Copy
Range("ae44:af44").PasteSpecial (xlPasteValues)
Worksheets("sheet1").Range("Ae45:Af46").ClearConte nts
'Changed this formula to reflect ETO calculation to mirror STOT.
Worksheets("sheet1").Range("Ak46").Copy
Range("Ae45").PasteSpecial (xlPasteFormulas)
'Take these two formulas and paste them into
'the Less Hrs Taken cells.
Worksheets("sheet1").Range("AL46:AM46").Copy
Range("Ae46:Af46").PasteSpecial (xlPasteFormulas)