Hi
Friends
i got one code in Google search, with that code we can hide the formula and get value of the formula in the formula bar
The code is working fine when we use the Range Section, if we insert the row in given range then formula will display due to the range option extend from the code
here is the code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Rng As Range
Static Started As Boolean
Static Cell As Range
Static TheFormula As String
Set Rng = Range("A1:A20")
If Not Application.Intersect(ActiveCell, Rng) Is Nothing Then
If Not Cell Is Nothing Then
Cell.Formula = TheFormula
End If
Set Cell = ActiveCell
With Cell
TheFormula = .Formula
.Value = .Value
End With
Started = True
Else
If Started Then
With Cell
.Formula = TheFormula
End With
End If
End If
End Sub
so my request is just remove the range section, i mean in the entire worksheet some cells has formula then when we select the cell then it will hide the formula and show only value. If some one insert the row above the formula then nothing effect the formula.
hope you understand
Thanks
SP
Bookmarks