Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Concatenate Text to create Formula

I am trying to concatenate text from several cells to
create a formula.
I can do this to display as text then copy and paste
special as values into a new cell. This displays still as
text, but if I then edit the cell by pressing "F2" then
press enter without changing anything this converts the
text into a formula.
The problem with doing it this way is I need this to
become a formula automatically without having to edit the
cell to get it to become a formula. As the copy paste
special function is part of a macro, the macro wont allow
me to edit each cell without displaying the exact
contents of the cell, which change on a daily basis.

The cell contents are as follows
=CONCATENATE("='\\server\FO_Data\EXPORT\[Trial
Balance",$A$1,$B$2,$B$1,$C$2,$C$1,".XLS]Sheet1'!B8")

Cells $A$1,$B$2,$B$1,$C$2,$C$1 are all variables that
change, so the only way I can work out how to do this is
to use the concatenate function.

I am using Excel XP.
Thanks in anticipation of your wisdom and help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Concatenate Text to create Formula

Brendon,

You could use a macro: this example will create a formula in cell B8 of the activesheet:

Sub MakeFormula()

Range("B8").Formula = _
"='\\server\FO_Data\EXPORT\[Trial Balance" & _
Range("$A$1").Value & _
Range("$B$2").Value & _
Range("$B$1").Value & _
Range("$C$2").Value & _
Range("$C$1").Value & _
".XLS]Sheet1'!B8"

End Sub

HTH,
Bernie
Excel MVP


"Brendon" wrote in message ...
I am trying to concatenate text from several cells to
create a formula.
I can do this to display as text then copy and paste
special as values into a new cell. This displays still as
text, but if I then edit the cell by pressing "F2" then
press enter without changing anything this converts the
text into a formula.
The problem with doing it this way is I need this to
become a formula automatically without having to edit the
cell to get it to become a formula. As the copy paste
special function is part of a macro, the macro wont allow
me to edit each cell without displaying the exact
contents of the cell, which change on a daily basis.

The cell contents are as follows
=CONCATENATE("='\\server\FO_Data\EXPORT\[Trial
Balance",$A$1,$B$2,$B$1,$C$2,$C$1,".XLS]Sheet1'!B8")

Cells $A$1,$B$2,$B$1,$C$2,$C$1 are all variables that
change, so the only way I can work out how to do this is
to use the concatenate function.

I am using Excel XP.
Thanks in anticipation of your wisdom and help.



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
CONCATENATE text to create a formula to be evaluated Brian Excel Worksheet Functions 2 January 2nd 10 02:25 AM
How to concatenate text into a formula? Wmm Excel Discussion (Misc queries) 5 August 12th 09 09:29 PM
Formula needed to concatenate text with result from calculation Mgville Excel Discussion (Misc queries) 1 February 13th 09 02:48 PM
how can i use concatenate to create a linking formula? DRandolph Excel Worksheet Functions 10 January 25th 06 07:27 PM
CONCATENATE text formula Lauren Excel Worksheet Functions 7 January 7th 06 10:24 PM


All times are GMT +1. The time now is 06:53 PM.

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"