Can I create a formula from text in several cells?

B

bmac

I have something in mind like combining cell references and operands and such
from several different cells to concatenate a formula, but I end up with just
text strings. Any ideas how to make them into recognizable formulas?
 
P

Peo Sjoblom

By using INDIRECT you can convert strings into cell references, do a google
search
for INDIRECT and text strings


regards,

Peo Sjoblom
 
B

Bernie Deitrick

You can use VBA to convert the string formula into a formula. Select the
cell, and run this:

Sub ConvertStringToFormula()
ActiveCell.Formula = ActiveCell.Text
End Sub

That will work as long as the formula returns a string that is a valid
formula (including the leading = sign).

HTH,
Bernie
MS Excel MVP
 
Top