PC Review


Reply
Thread Tools Rate Thread

concatenate an "actionable" formula

 
 
KG Old Wolf
Guest
Posts: n/a
 
      16th Oct 2009
I need to create a VLOOKUP that uses a variable for the TABLE ARRAY element
in the formula.

I can create the proper formula but it won't execute the lookup. It begins
with an = sign but it acts like it is only text. How can I take:

=concatenate("=VLOOKUP($B$11,Table" & b31 & ",3,FALSE")) and have the result
perform the lookup?

I've tried using an indirect(b31) but that isn't it either.

Help!

Thanks,
Ken

 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      16th Oct 2009
Have you considered using a named range? It can be pre-defined or defined
with VBA.

"KG Old Wolf" wrote:

> I need to create a VLOOKUP that uses a variable for the TABLE ARRAY element
> in the formula.
>
> I can create the proper formula but it won't execute the lookup. It begins
> with an = sign but it acts like it is only text. How can I take:
>
> =concatenate("=VLOOKUP($B$11,Table" & b31 & ",3,FALSE")) and have the result
> perform the lookup?
>
> I've tried using an indirect(b31) but that isn't it either.
>
> Help!
>
> Thanks,
> Ken
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      16th Oct 2009
It looks like you could use something like:

Try:
=VLOOKUP($B$11,indirect("Table"&b31),3,FALSE)



KG Old Wolf wrote:
>
> I need to create a VLOOKUP that uses a variable for the TABLE ARRAY element
> in the formula.
>
> I can create the proper formula but it won't execute the lookup. It begins
> with an = sign but it acts like it is only text. How can I take:
>
> =concatenate("=VLOOKUP($B$11,Table" & b31 & ",3,FALSE")) and have the result
> perform the lookup?
>
> I've tried using an indirect(b31) but that isn't it either.
>
> Help!
>
> Thanks,
> Ken


--

Dave Peterson
 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      19th Oct 2009
you need the IDIRECT function and you don't need concatenate


so I think your aim is to replace this

=VLOOKUP(B11, table4,3,false) 'A

with a variable for table4

so breakign it down

=VLOOKUP(B11,INDIRECT("table4"),3,false)
should be the same as 'A above and then

=VLOOKUP(B11,INDIRECT("table" & "4"),3,false)
then
=VLOOKUP(B11,INDIRECT("table" & B31),3,false)

if B31 has the value 5, then the lookup would be table5







"KG Old Wolf" wrote:

> I need to create a VLOOKUP that uses a variable for the TABLE ARRAY element
> in the formula.
>
> I can create the proper formula but it won't execute the lookup. It begins
> with an = sign but it acts like it is only text. How can I take:
>
> =concatenate("=VLOOKUP($B$11,Table" & b31 & ",3,FALSE")) and have the result
> perform the lookup?
>
> I've tried using an indirect(b31) but that isn't it either.
>
> Help!
>
> Thanks,
> Ken
>

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      19th Oct 2009
sorry, typo. IDIRECT should of course be INDIRECT , which is typed
correctly in the formula that I gave.

"Patrick Molloy" wrote:

> you need the IDIRECT function and you don't need concatenate
>
>
> so I think your aim is to replace this
>
> =VLOOKUP(B11, table4,3,false) 'A
>
> with a variable for table4
>
> so breakign it down
>
> =VLOOKUP(B11,INDIRECT("table4"),3,false)
> should be the same as 'A above and then
>
> =VLOOKUP(B11,INDIRECT("table" & "4"),3,false)
> then
> =VLOOKUP(B11,INDIRECT("table" & B31),3,false)
>
> if B31 has the value 5, then the lookup would be table5
>
>
>
>
>
>
>
> "KG Old Wolf" wrote:
>
> > I need to create a VLOOKUP that uses a variable for the TABLE ARRAY element
> > in the formula.
> >
> > I can create the proper formula but it won't execute the lookup. It begins
> > with an = sign but it acts like it is only text. How can I take:
> >
> > =concatenate("=VLOOKUP($B$11,Table" & b31 & ",3,FALSE")) and have the result
> > perform the lookup?
> >
> > I've tried using an indirect(b31) but that isn't it either.
> >
> > Help!
> >
> > Thanks,
> > Ken
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Microsoft Excel Misc 0 17th Jul 2006 02:38 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son Microsoft Excel Programming 2 5th Mar 2006 12:20 PM
Replace "insert function" with "edit formula" button in fourmula b =?Utf-8?B?MTNicmlhbg==?= Microsoft Excel Misc 0 24th Aug 2005 08:49 PM
<FORM METHOD="post" onSubmit="return fieldcheck()" name="orientation" action="http://ws-kitty.BU.edu/AT/survey/orientation/script/write.asp" language="JavaScript"> Joeyej Microsoft ASP .NET 0 4th Jun 2004 08:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.