Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default concatenate an "actionable" formula

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default concatenate an "actionable" formula

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default concatenate an "actionable" formula

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default concatenate an "actionable" formula

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default concatenate an "actionable" formula

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
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM


All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"