K
kwiklearner
I am trying to create a range where it can be used in a vlookup formul
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 vi
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...
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 vi
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...