Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 516
Default Calculate the function in a cell that is created with CONCATENATE

Background ....
$G$1 = a list
$L$6 = =CONCATENATE(RIGHT(E1,2)," Q")
$M$6 = A7:K78
$N$6 = =CONCATENATE("'",L6,"'",M6)

I built a formula with the concatenate function:

=CONCATENATE("=VLOOKUP(G1,",N6,",2,FALSE)")

That produces the desired formula:

=VLOOKUP(G1,'AG Q'!A7:K78,2,FALSE)

But, that output function does not calculate unless I go into the cell and
F2 F9.

Is there a way to have Excel perform that function automatically?
--
Matt
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Calculate the function in a cell that is created with CONCATENATE

N16 contains a string that looks like a formula. Consider this very tiny
User Defined Function:

Function eval(r As Range) As Variant
eval = Evaluate(r.Value)
End Function

It calculates a string as a formula. For example if A1 thru A4 contain:

1
+
2
=

and A5 contains:
=A4 & A3 & A2 & A1
A5 displays:
=2+1

eval(A5) will display 3

--
Gary''s Student - gsnu200909


"Matt" wrote:

Background ....
$G$1 = a list
$L$6 = =CONCATENATE(RIGHT(E1,2)," Q")
$M$6 = A7:K78
$N$6 = =CONCATENATE("'",L6,"'",M6)

I built a formula with the concatenate function:

=CONCATENATE("=VLOOKUP(G1,",N6,",2,FALSE)")

That produces the desired formula:

=VLOOKUP(G1,'AG Q'!A7:K78,2,FALSE)

But, that output function does not calculate unless I go into the cell and
F2 F9.

Is there a way to have Excel perform that function automatically?
--
Matt

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 153
Default Calculate the function in a cell that is created with CONCATENATE

Background ....
$G$1 = a list
$L$6 = =CONCATENATE(RIGHT(E1,2)," Q")
$M$6 = A7:K78
$N$6 = =CONCATENATE("'",L6,"'",M6)

I built a formula with the concatenate function:

=CONCATENATE("=VLOOKUP(G1,",N6,",2,FALSE)")

That produces the desired formula:

=VLOOKUP(G1,'AG Q'!A7:K78,2,FALSE)

But, that output function does not calculate unless I go into the cell and
F2 F9.



There's a different approach that might be easier to use.

Instead of using CONCATENATE to build a formula, I approached it using
=VLOOKUP(G1,OFFSET(...),2,FALSE)

The purpose of OFFSET(...) here is to specify a table_array of the
needed height and width, placed properly in 'AG Q'.

For example, I tried
=VLOOKUP(G1,OFFSET('AG Q'!$A$1,A1,A2,A3,A4),2,FALSE)
where
A1 contains the vertical offset in 'AG Q' where table_array starts
A2 contains the horizontal offset in 'AG Q' where table_array
starts
A3 contains the height of table_array
A4 contains the width of table_array

Your case might not be as general as this, so modify to suit.
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
I created a UDF but I can't run the function ... bhilton84 Excel Worksheet Functions 5 May 31st 07 09:50 PM
Help with function created in VBA Bob K Excel Worksheet Functions 3 December 15th 06 10:12 PM
Concatenate function should accept cell-ranges johndog Excel Discussion (Misc queries) 3 October 5th 06 01:20 AM
use formatting from source cell in CONCATENATE function zacarab Excel Worksheet Functions 2 September 18th 06 11:25 PM
use formatting from source cell in CONCATENATE function zacarab Excel Worksheet Functions 1 September 18th 06 11:25 PM


All times are GMT +1. The time now is 12:50 PM.

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

About Us

"It's about Microsoft Excel"