Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default VLookUp in Macro not compiling

Try this form in VB:
Application.WorksheetFunction.VLookup(ActiveSheet. Cells(i,1),'C:\Reference\[TranMaster.xls]
_
Translator'!$A$11:$AC$54,2,TRUE)

Add .WorksheetFunction & remove orphaned If condition ," ") from the
end.

Mike F



"Craigm" wrote in
message ...

'=IF($AA3< "
",VLOOKUP(ABS($AA3),'C:\Reference\[TranMaster.xls]Translator'!$A$11:$AC$54,2,TRUE),"
")

The above VLookUp statement runs great when its in a cell.

In a macro it won't compile. At the ' in front of 'C:\Reference\...
the compiler says "Expected Expression."

Below is what is actually crashing

===============
If (sBreakDown < " ") Then
sDistrict =
Application.VLOOKUP(ActiveSheet.Cells(i,1),'C:\Ref erence\[TranMaster.xls]Translator'!$A$11:$AC$54,2,TRUE),"
")
End If
===============

Thanks for helping..Too many hours, not enough sleep! Craigm


--
Craigm
------------------------------------------------------------------------
Craigm's Profile:
http://www.excelforum.com/member.php...o&userid=24381
View this thread: http://www.excelforum.com/showthread...hreadid=383822



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
compiling data from multiple Excel sheets - macro? Stephanie Mistretta Excel Worksheet Functions 2 April 23rd 08 11:44 AM
Macro compiling screen andrewbt Excel Discussion (Misc queries) 1 July 27th 07 12:04 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
VLookUp in Macro not compiling Bob Phillips[_7_] Excel Programming 3 July 1st 05 02:46 PM
Compiling a macro as a .exe? tehwa[_4_] Excel Programming 1 December 29th 03 04:58 AM


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