Reputation: 165
I'm trying to create a string and then execute it. By this I mean, taking 'A' and '20' concatenating them and then getting the value of A20 in that cell.
Examples:
="A" & "20" -> doesn't work
=(CONCATENATE("A", "20")) -> doesn't work
Is there an execute function in excel? Example
=EXECUTE("string value")
so then I could create a string it would execute similar to if I typed =string
value
Upvotes: 3
Views: 24603
Reputation: 3136
Not sure what you are trying to do - but if you are trying to get the value in cell A20 then you want to do this:
=INDIRECT((CONCATENATE("A", "20")),TRUE)
If you are trying to just concatenate those two strings then what you are doing is fine - and it shoudl work.
If you are trying to insert the string value of "A20" into a cell then you need to copy and paste special only values on your cell with your formula - this will convert your functions into simply their actual result values.
Upvotes: 7
Reputation: 3436
The 'Indirect' function is what you're looking for: =INDIRECT(CONCATENATE("A","20"))
It returns the reference for a text string. Here is a good MSDN article about the function: http://support.microsoft.com/kb/151323
Upvotes: 1