Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Excel Formulas as text strings

Status
Not open for further replies.

questril

Technical User
Oct 22, 2001
5
GB
I want to use the formula in a cell (not the value it produces) in another formula - essentially I want to be able to take the text string which I have typed in to create a formula and concatenate it with other text, then display it in another cell. I do not want to print the whole spreadsheet displaying formulae.

Any ideas?
 
Hi questril,

Based on your description, here's a sample...

Dim cur As String
Dim result As String
Dim mess As String

Sub test()
cur = ActiveCell.Formula
mess = "This is an example"
result = mess & " " & cur
ActiveCell.Offset(0, 3).Select
ActiveCell.Value = result
ActiveCell.Offset(0, -3).Select
End Sub

Hopefully this will help to get you started. Please advise as to whether it is close to what you required.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top