![]() |
#1
|
|||
|
|||
![]()
Hi,
I have a problem similar to the last one (where I had to fill a row_variable into a Range_statement): Now I have to fill it into a VLOOKUP formula to write to a specific cell. How should I do that? Thanks a lot! Best regards, Officer_Bierschnitt |
#2
|
||||
|
||||
![]()
Can you provde more information as to exactly where you need the variable to be used?
|
#3
|
|||
|
|||
![]()
Hi Debaser,
well, I needed it as one parameter specifying the lookup_range (the array where to look for the value). I solved this, however, by just giving that range a name using the Excel_name_manager and specifying that name in the formula. The case is thus solved ;-) Thanks anyway! Best regards, Officer_Bierschnitt |
#4
|
||||
|
||||
![]()
Sample of the code you have would have been useful, but essentially you just need something like:
Code:
Activecell.Formula = "=VLOOKUP(A2,Sheet2!$A$1:$F$" & your_row_variable & ",2,FALSE) |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Object Variable or With block variable not set | Raza | Excel Programming | 8 | 01-15-2015 12:19 AM |
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge | Berryblue | Mail Merge | 1 | 11-13-2014 05:36 PM |
![]() |
JUST ME | Word VBA | 4 | 03-25-2014 06:56 AM |
![]() |
MJP143 | Excel | 1 | 02-11-2013 05:07 AM |
![]() |
tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |