The above image shows 3 cells containing the formula instead of the value; The first cell is under PHP Hourly Rate, the second is under Name and the third is the Invoice Sub Total. However, the values will show after I double click the cell then press enter. Why is this happening? I am using Excel VBA on Excel 2013.
Thanks.
This question is related to
excel
If all else fails, Ctrl-H (search and replace) with "=" in both boxes (in other words, search on = and replace it with the same =). Seems to do the trick.
Make sure that...
=
sign before the formula=
sign=A1
, instead of "=A1"
)Check for spaces in your formula before the "=". example' =A1' instean '=A1'
If you are using Excel 2013 Than do the following File > Option > Advanced > Under Display options for this worksheet: uncheck the checkbox before Show formulas in cells instead of their calculated results This should resolve the issue.
I tried everything I could find but nothing worked. Then I highlighted the formula column and right-clicked and selected 'clear contents'. That worked! Now I see the results, not the formula.
If you are using VBA to enter formulas, it is possible to accidentally enter them incompletely:
Sub AlmostAFormula()
With Range("A1")
.Clear
.NumberFormat = "@"
.Value = "=B1+C1"
.NumberFormat = "General"
End With
End Sub
A1 will appear to have a formula, but it is only text until you double-click the cell and touch Enter .
Make sure you have no bugs like this in your code.
Try this if the above solution aren't working, worked for me
Cut the whole contents in the worksheet using "Ctrl + A" followed by "Ctrl + X" and paste it to a new sheet. Your reference to formulas will remain intact when you cut paste.
I had the same problem and solved with below:
Range("A").Formula = Trim(CStr("the formula"))
Source: Stackoverflow.com