Good day I am trying to use VBA to insert the following formula into a Cell:
="last change completed: "& D2&" "&"by " &TEXT(E2;"dd-mmm-yy")
Where D2 would be a name and E2 would be a date. If i use the macro record i get:
Sub Macro8()
'
' Macro8 Macro
'
'
Range("D12").Select
ActiveCell.FormulaR1C1 = _
"=""last change completed: ""& R[-11]C[-1]&"" ""&""on "" &TEXT(R[-11]C,""dd-mmm-yy"")"
' ActiveCell.FormulaR1C1 = _
"=""last change completed: ""& R2C4&"" ""&""on "" &TEXT(R2C5,""dd-mmm-yy"")"
Range("D13").Select
End Sub
The problem i have is the moment i try to change the cell locations to variables i get broken formulas in the cell, for example something similar to :
="last change completed: " &@ Range(SOP1)
where the "@range(SOP1) was supposed to be a variable cell location. i hope this is enough detail.