Generating Functions with "Concatenate"

  • Thread starter Thread starter Bill602
  • Start date Start date
B

Bill602

I'm using Excel 2002 to generate commands using the Concatenate function to
lookup reference info in other cells. I can't get the text strings from
Concatenate to be recognized as commands. I've tried "paste special" and
selecting "formulas", but that didn't work.

For example, I created a string ( =G3 ) with concatenate, but it is not
recognized as a command. When I type the command in, it works, but appears
the same as the concatenated text string. How can I make this into an
executable command?

Bill602
 
Try it like this:

=INDIRECT("G3")

Or, using cells to hold the individual components:

A1 = G
B1 = 3

=INDIRECT(A1&B1)
 
You could set up this user-defined function:

Function eval(func As String)
Application.Volatile
eval = Evaluate(func)
End Function

and then you could use it as:

=eval(A1)

and if A1 contains a string that represents an Excel formula then it
will be evaluated.

Hope this helps.

Pete
 
Back
Top