LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
matpj
 
Posts: n/a
Default VLOOKUP problem using VBA


hi,

I have some code that inserts a VLOOKUP function in my spreadsheet.

the only thing is, it always goes to the 'true' part of the statement.

here's the code that inserts it:

Code:
--------------------

Columns("E:E").Select
Selection.Insert Shift:=xlToRight
lastrow1 = Cells(Rows.Count, "D").End(xlUp).Row
Range("E" & lastrow1 & ":E2").Select
Selection.FormulaR1C1 = "=IF(ISERROR(VLOOKUP(RC[-1],'PET BDC - Design Phase Dev'!D:D,1,0)), ""False"", ""True"")"

--------------------


everything comes back as "False", but if I then delete the column that
was inserted, and reinsert manually and type int he formula, it works
fine.

can anyone tell me why this might not be working...

thanks,
Matt


--
matpj
------------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
View this thread: http://www.excelforum.com/showthread...hreadid=537145

 
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
vlookup problem puiuluipui Excel Discussion (Misc queries) 2 February 5th 06 05:46 PM
Vlookup problem with Date Time normajmarsh Excel Worksheet Functions 0 February 3rd 06 07:33 PM
vlookup Problem marksuza Excel Discussion (Misc queries) 3 December 22nd 05 03:40 PM
VLOOKUP Problem Tosca Excel Worksheet Functions 7 July 23rd 05 10:43 PM
VLOOKUP, OFFSET, MATCH PROBLEM, HELP? Steve Excel Worksheet Functions 0 January 30th 05 09:11 PM


All times are GMT +1. The time now is 08:17 PM.

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"