Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello please help. in vba, i have the following statement
ActiveCell.Formula = "=VLOOKUP(" & sRef1 & " & d2,Sheet6!f:i,4,FALSE)" actually, what i want to do is to encapsulate the variable sRef1 with inverted commas. e.g. the variable value is A. so my lookup value is "A"&D2 does that make sense? if so how do i do that? cheers -- MS SBS 2003 SP2 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.Formula = "=VLOOKUP(""A" & sRef1 & """ & d2,Sheet6!f:i,4,FALSE)"
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Mentos" wrote in message ... hello please help. in vba, i have the following statement ActiveCell.Formula = "=VLOOKUP(" & sRef1 & " & d2,Sheet6!f:i,4,FALSE)" actually, what i want to do is to encapsulate the variable sRef1 with inverted commas. e.g. the variable value is A. so my lookup value is "A"&D2 does that make sense? if so how do i do that? cheers -- MS SBS 2003 SP2 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks bob. actually the result was slightly diff to what i expected but i
understand your concept. i modified my statement to: ActiveCell.Formula = "=VLOOKUP(""" & sRef1 & """ & d2,Sheet6!f:i,4,FALSE)" and this yielded my result cheers! -- MS SBS 2003 SP2 "Bob Phillips" wrote: ActiveCell.Formula = "=VLOOKUP(""A" & sRef1 & """ & d2,Sheet6!f:i,4,FALSE)" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Mentos" wrote in message ... hello please help. in vba, i have the following statement ActiveCell.Formula = "=VLOOKUP(" & sRef1 & " & d2,Sheet6!f:i,4,FALSE)" actually, what i want to do is to encapsulate the variable sRef1 with inverted commas. e.g. the variable value is A. so my lookup value is "A"&D2 does that make sense? if so how do i do that? cheers -- MS SBS 2003 SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLookup Variable Offset | Excel Discussion (Misc queries) | |||
Vlookup - Variable look_up value? | Excel Discussion (Misc queries) | |||
Using a variable for the 2nd paremeter in a vlookup | Excel Programming | |||
vlookup using a variable | Excel Programming | |||
variable vlookup | Excel Programming |