![]() |
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 |
All times are GMT +1. The time now is 10:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com