Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering Formula - Cannot select cell as it is hidden by formula Jim Excel Worksheet Functions 0 March 25th 10 07:22 AM
entering a formula into a cell with text TV Excel Discussion (Misc queries) 3 November 5th 08 04:45 PM
Entering Sum formula into a cell Leo Heuser[_2_] Excel Programming 0 September 29th 03 07:55 PM
Entering Sum formula into a cell Bernard Liengme[_3_] Excel Programming 0 September 29th 03 04:11 PM
Entering Sum formula into a cell Don Guillett[_4_] Excel Programming 0 September 29th 03 03:55 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"