I am trying to show the formulas of one range of cell in another range
of cells. I want range (I4:I15) to show the formulas in range(F4:F15).
Below is the formula I am using but I am new to visual basic and I cant
get this formula to work. Can anyone help?
Range(quot;F4:F15quot;).Select
Selection.Copy
Range(quot;I4quot;).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Function GetFormula(I4) As String
GetFormula = cell.Formula
End Function
Any comment is greatly appreciated. Thanks.Change the UDF:
Function GetFormula(cell as range) As String
GetFormula = cell.Formula
End Function
Then put this in F4:
=getformula(i4)
and drag down.wrote:
gt;
gt; I am trying to show the formulas of one range of cell in another range
gt; of cells. I want range (I4:I15) to show the formulas in range(F4:F15).
gt; Below is the formula I am using but I am new to visual basic and I cant
gt; get this formula to work. Can anyone help?
gt;
gt; Range(quot;F4:F15quot;).Select
gt; Selection.Copy
gt; Range(quot;I4quot;).Select
gt; ActiveSheet.Paste
gt; Application.CutCopyMode = False
gt;
gt; Function GetFormula(I4) As String
gt; GetFormula = cell.Formula
gt; End Function
gt;
gt; Any comment is greatly appreciated. Thanks.
--
Dave Peterson
Thank you- that was easier than I thought
- Nov 18 Sat 2006 20:10
GetFormula function
close
全站熱搜
留言列表
發表留言