Generating Functions with "Concatenate"

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
 
T

T. Valko

Try it like this:

=INDIRECT("G3")

Or, using cells to hold the individual components:

A1 = G
B1 = 3

=INDIRECT(A1&B1)
 
P

Pete_UK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top