![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Is it possible to dynamically create a function in a cell?
I know that it is possible to do this for simple functions such as: ActiveCell.FormulaR1C1 = "=COS(8)" will set the cell to =COS(8) However, I would like to make cell A2 contain the function: =LOOKUP(A1,'[MyFile.xls]AllSites'!$A$4:$A$15,'[MyFile.xls]AllSites'!$B$4:$B$15) Where I control MyFile.xls via a variable or another cells contents. I have been able to make the cell contents equal the following TEXT: "LOOKUP(A1,'[MyFile.xls]AllSites'!$A$4:$A$15,'[MyFile.xls]AllSites'!$B$4:$B$15)" where MyFile.xls is actually the contents of another cell. However, this is just text as there is no '=' sign to make it a function. I can manually select the cell and add the '=' sign and it will work as I want it. Unfortunately, i can't seem to do this automatically. Any bright ideas people? Many Thanks. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Can anyone help on this?
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
http://mrexcel.com/board/viewtopic.p...c=2170&forum=2 If so, did you try out Longre's EVAL? If it's not the same question, I'd suggest to have a look at that. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|