LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default excel - inserting a formula in a cell (using =) fails


I have used the method of inserting a formula in a cell using '=

if one insert "=a1" in a cell (a2) the excel treats this string as a
formula and executes its.

But i a application I insert a vlookup in cells

In a2 is placed a name and in a2 is then filles with
"=vlookup(anothersheets!a:b"...)
If the formula is inserted directly in the cell excel executes it.

However when the vba program tries to insert the "=vlookup..."
statement in a2 it stops with an error because the vlookup fails
itself .
The application was suppoed to find the names which was missing but I
exected it to insert "=vlookup..." in cells a2,b2,.. and thereafter
expected to see N#A in cell a2,b2 or these cells where the name in a1
was missing.

What should I do so vba is not stopping the updating.
I have tried the om local error... which works in the program, but the
vlookup is not inserted in the a2..

Another approach is of course to let the program examine if there is a
name in the second sheet but why as the excel has the excellent
formula?
And the names in sheet two is only filled out after the the names in
sheet one is inserted.

Does anyone have a clue (maybe stop calculating while inserting - how
should one do that)?

thnkx
Anders Karbek



 
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
Inserting formula in the cell below Raj[_2_] Excel Worksheet Functions 1 August 1st 09 03:26 AM
Excel formula fails to update barry Excel Discussion (Misc queries) 1 September 17th 06 12:44 PM
Formula fails in text formatted cell kennoc Excel Worksheet Functions 2 May 3rd 06 12:36 AM
cell.formula fails Garry[_8_] Excel Programming 1 February 24th 06 02:36 AM
updating range value via knowledbase 278973 fails when cell contains formula Ian Ornstein Excel Programming 1 January 29th 04 10:24 AM


All times are GMT +1. The time now is 07:05 AM.

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

About Us

"It's about Microsoft Excel"