LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Using vlookup in VB


I am trying to create a range where it can be used in a vlookup formula
through VBA.
What I have so far:

Dim irange as range
Set irange = activesheet.range("A1:B10") 'range is in mybook.xls,
sheet1

the following formula will be populated in a separate workbook via
VBA:
I've tried:
range("D4").formula="=vlookup(rc3" & irange & "2,false)"
range("D4").formula="=vlookup(rc3,'[mybook.xls]sheet1'!" & irange &
",false)"
range("D4").formula="=vlookup(rc3,'[mybook.xls]" & irange & "2,false)"

For all the formulas above, I get a run-time 13 error, type mismatch.


Any help will be very much appreciated...
Thanks in advance....


--
kwiklearner
------------------------------------------------------------------------
kwiklearner's Profile: http://www.excelforum.com/member.php...o&userid=31909
View this thread: http://www.excelforum.com/showthread...hreadid=562910

 
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 a Vlookup adamb2000 Excel Worksheet Functions 4 June 28th 06 10:54 PM
VLOOKUP Problem Ian Excel Discussion (Misc queries) 3 April 6th 06 06:47 PM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


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