Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering a Excel formula in a Cell through VBA?
Geez this is the third thread today, well what do I expect I am workin
with VBA programming and Excel in a big company and being new to VBA stumble in some problems. Anyway this one should be simple, and I don't get why doesn't it work. I am trying to enter a Excel formula (VLOOKUP) into a cell but all get is "Application-Defined or Object-Defined Error". Here is the line Worksheets("Failures").Range("A1").Offset(1, 12).Value "=VLOOKUP(I2;'Defect Codes'!$A$1:$B$76;2;0)" If I substitue the formula for some random string it runs fin otherwise I get the error, I have entered formulas before in Excel b writing like above but I don't know why is it claiming this now. Thanks in advance Best Regards Noo -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering a Excel formula in a Cell through VBA?
I notice that you have used semi-colons in the formula. In the UK we us
commas :- "=VLOOKUP(I2,'Defect Codes'!$A$1:$B$76,2,0)" It helps if you show your Location in your profile -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering a Excel formula in a Cell through VBA?
Thanks, I have solved it by using WorkSheetFunction and running VLOOKU
from VBA instead but my location is Sweden, maybe you are right although semi-colons do work when entered in the cells itself. Best Regards Noo -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Entering Formula - Cannot select cell as it is hidden by formula | Excel Worksheet Functions | |||
entering a formula into a cell with text | Excel Discussion (Misc queries) | |||
Entering Sum formula into a cell | Excel Programming | |||
Entering Sum formula into a cell | Excel Programming | |||
Entering Sum formula into a cell | Excel Programming |