Hi friends,
I have created many formulas and now i want all of my formula to get converted into text through VBA.I have heared that it's possible but don't know how to do it can anyone help me out with this issue.
Printable View
Hi friends,
I have created many formulas and now i want all of my formula to get converted into text through VBA.I have heared that it's possible but don't know how to do it can anyone help me out with this issue.
Try to use the following code in VBA
Code:Sub temp()
Dim temp As String
temp = Cells(2, 3).Formula
Cells(3, 3).Value = " " & temp
End Sub
You can also use this code for converting text in VBA.
Code:Sub change()
On Error Resume Next
With ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
.Value = .Value
End With
End Sub
You can also use the following code for getting the formula and appropriately transfer it any where.
Code:Dim a
a=Cells(2,3).Formula
cells(3,3).Formula=a