Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Syntax Error in VLOOKUP Code

Welcome back!

--
Regards,
Tom Ogilvy

"Ken" wrote in message
...
Thanks, Tom.
Been a while since I was on this newsgroup and thought I was at the "wrong
house" at first. Glad you are still here helping!

"Tom Ogilvy" wrote:

Assume FileOpenName850 is like "myfile.xls" and not
"C:\Myfolder\Myfile.xls"

You don't specify which worksheets, so assume the first

Dim rng as Range
Set rng = Workbooks(FileOpenName850).worksheets(1).Range("A1 :C" &
NumRowsF850)
For ILoop = NumRowsIFCAP to 1 Step -1
if iserror(Application.Vlookup(Cells(ILoop,1),rng,2,F alse)) then

--
Regards,
Tom Ogilvy





IF(ISERROR(VLOOKUP(Cells(Iloop,1),FileOpenNameF850 !$A$1:$C$NumRowsF850,2,FAL
SE)))
"Ken" wrote in message
...
I have the following code as part of a larger macro.

For ILoop = NumRowsIFCAP To 1 Step -1



IF(ISERROR(VLOOKUP(Cells(Iloop,1),FileOpenNameF850 !$A$1:$C$NumRowsF850,2,FAL
SE))) then
(More code...)
End If
Next Iloop

"FileOpenNameF850" is a string variable that holds a workbook name

that
contains one worksheet.

I can't get the syntax correct in the VLOOKUP line of code. What is

the
correct syntax?

TIA.






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
Syntax problem with code WLMPilot Excel Discussion (Misc queries) 1 March 15th 08 07:07 PM
VBA code to sum a row: syntax needed [email protected] Excel Discussion (Misc queries) 1 July 11th 05 06:41 PM
Vlookup Syntax Error YV New Users to Excel 9 December 23rd 04 05:28 PM
help with code/syntax Jay Baxter Excel Programming 0 February 26th 04 08:11 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 10:22 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"