Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do i use multiple cells to create a formula ?

I am linking many different cells from over 100 seperate files. As the cells
appear in the same location on each file I would like to know if I can join
text in serveral cells to create an external link rather than going into
every file and manually link each cell ?

Thanks Rob
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default how do i use multiple cells to create a formula ?

Rob,

One way is to create the referencing formulas with formulas, and then using
a macro to convert to actual formulas. For example:

In cell A2, put the folder path:
C:\Excel\Folder\

In cell B2, put a filename
Blah blah.xls

In cell C2, put the sheetname:
Sheet2

In cell D2, put the cell address:
A2

in Cell E2, put the formula
="='"&A2 & "[" & B2 & "]" &C2 & "'!" &D2

You can do this for as many cell addresses as you need, or sheets, etc. with
other columns, with one formula for each "link".

Then copy those cells down as far as you need, and properly increment the
filenames in column B. You
can use a formula to do so, if they are regular enough - say, based on a
date. Otherwise, you could use a macro to dump the names.

Then select the cells in column E, and run this macro:

Sub ConvStringToFormula()
Dim myCell As Range
For Each myCell In Selection
myCell.Formula = myCell.Text
Next
End Sub

HTH,
Bernie
MS Excel MVP


"Rob Welsh (Austin)" <Rob Welsh wrote in
message ...
I am linking many different cells from over 100 seperate files. As the
cells
appear in the same location on each file I would like to know if I can
join
text in serveral cells to create an external link rather than going into
every file and manually link each cell ?

Thanks Rob



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default how do i use multiple cells to create a formula ?

The function you'd want to use that's built into excel is =indirect(). But that
function returns an error if the sending workbook is closed.

Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/

That includes =indirect.ext() that may help you.

Another option would be to a little work.

Use formulas to build the string that looks like a formula.

My "real" formula would look like:

='C:\My Documents\excel\[book1.xls]Sheet1'!$A$1

My formula to build the string that looks like a formula may look like:

="='" & a1 & "\[" & b1 & "]" & c1 & "'!$A$1"

Depending on what's in A1:C1

Then I could drag that formula down the column.
Copy|paste special|values
Now it's just a string that looks like:
='C:\My Documents\excel\[book1.xls]Sheet1'!$A$1
But it's not a formula (yet).

The last step is to select that range and
Edit|Replace
what: = (equal sign)
with: =
replace all

But do this last portion on just a small subset of your range. If there's a
mistake, you'll be dismissing dialogs forever if you use too large of a range.






Then convert those strings to values and

Rob Welsh (Austin) wrote:

I am linking many different cells from over 100 seperate files. As the cells
appear in the same location on each file I would like to know if I can join
text in serveral cells to create an external link rather than going into
every file and manually link each cell ?

Thanks Rob


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default how do i use multiple cells to create a formula ?



"Rob Welsh (Austin)" wrote:

I am linking many different cells from over 100 seperate files. As the cells
appear in the same location on each file I would like to know if I can join
text in serveral cells to create an external link rather than going into
every file and manually link each cell ?

Thanks Rob

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default how do i use multiple cells to create a formula ?



"Rob Welsh (Austin)" wrote:

I am linking many different cells from over 100 seperate files. As the cells
appear in the same location on each file I would like to know if I can join
text in serveral cells to create an external link rather than going into
every file and manually link each cell ?

Thanks Rob



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default how do i use multiple cells to create a formula ?



"Bernie Deitrick" wrote:

Rob,

One way is to create the referencing formulas with formulas, and then using
a macro to convert to actual formulas. For example:

In cell A2, put the folder path:
C:\Excel\Folder\

In cell B2, put a filename
Blah blah.xls

In cell C2, put the sheetname:
Sheet2

In cell D2, put the cell address:
A2

in Cell E2, put the formula
="='"&A2 & "[" & B2 & "]" &C2 & "'!" &D2

You can do this for as many cell addresses as you need, or sheets, etc. with
other columns, with one formula for each "link".

Then copy those cells down as far as you need, and properly increment the
filenames in column B. You
can use a formula to do so, if they are regular enough - say, based on a
date. Otherwise, you could use a macro to dump the names.

Then select the cells in column E, and run this macro:

Sub ConvStringToFormula()
Dim myCell As Range
For Each myCell In Selection
myCell.Formula = myCell.Text
Next
End Sub

HTH,
Bernie
MS Excel MVP


"Rob Welsh (Austin)" <Rob Welsh wrote in
message ...
I am linking many different cells from over 100 seperate files. As the
cells
appear in the same location on each file I would like to know if I can
join
text in serveral cells to create an external link rather than going into
every file and manually link each cell ?

Thanks Rob




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
How to copy and paste same formula in multiple cells? Amanda Excel Worksheet Functions 1 June 30th 05 04:16 PM
apply a formula to multiple cells FixitFrog Excel Discussion (Misc queries) 3 June 23rd 05 11:54 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
How do I protect formula cells on multiple sheets? Webdiva Excel Worksheet Functions 0 May 3rd 05 08:29 PM
how do I create a formula to seperate name into two cells (last, . jobby55 Excel Discussion (Misc queries) 2 January 13th 05 05:00 AM


All times are GMT +1. The time now is 02:43 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"