Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 358
Default formula/autocomplete to link data from other worksheets

I need help writing a formula that will link a workbook file with thousands
of other workbooks files by using a formula using a standard file name
convention.

Here is the standard file naming convention:

'W:\Projects\ &A169 &" " &B169 & "\Financial Information\Monthly
Summaries\[" &A169 &" Monthly Summary.xls]Sheet1'!$F$12)

By using this formula I would like to use the auto fill feature to update
the folder/file references.

I have literally thousands of excel files that i need this master workbook
to link to. Entering in the values manually will take far to long to do.

Please help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default formula/autocomplete to link data from other worksheets

Andrew,

Select cell C169, and run this macro:

Sub MakeLinksForAndrew()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='W:\Projects\" & Cells(myCell.Row, 1).Value & " " & _
Cells(myCell.Row, 2).Value & "\Financial Information\Monthly
Summaries\[" & _
Cells(myCell.Row, 1) & "&" Monthly Summary.xls]Sheet1'!$F$12)"
Next myCell
End Sub

are created.

HTH,
Bernie
MS Excel MVP

"Andrew" wrote in message
...
I need help writing a formula that will link a workbook file with thousands
of other workbooks files by using a formula using a standard file name
convention.

Here is the standard file naming convention:

'W:\Projects\ &A169 &" " &B169 & "\Financial Information\Monthly
Summaries\[" &A169 &" Monthly Summary.xls]Sheet1'!$F$12)

By using this formula I would like to use the auto fill feature to update
the folder/file references.

I have literally thousands of excel files that i need this master workbook
to link to. Entering in the values manually will take far to long to do.

Please help



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 358
Default formula/autocomplete to link data from other worksheets

Thanks for the quick response

I am getting a syntax error with this formula

I am using excel 2003 - if that helps

"Bernie Deitrick" wrote:

Andrew,

Select cell C169, and run this macro:

Sub MakeLinksForAndrew()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='W:\Projects\" & Cells(myCell.Row, 1).Value & " " & _
Cells(myCell.Row, 2).Value & "\Financial Information\Monthly
Summaries\[" & _
Cells(myCell.Row, 1) & "&" Monthly Summary.xls]Sheet1'!$F$12)"
Next myCell
End Sub

are created.

HTH,
Bernie
MS Excel MVP

"Andrew" wrote in message
...
I need help writing a formula that will link a workbook file with thousands
of other workbooks files by using a formula using a standard file name
convention.

Here is the standard file naming convention:

'W:\Projects\ &A169 &" " &B169 & "\Financial Information\Monthly
Summaries\[" &A169 &" Monthly Summary.xls]Sheet1'!$F$12)

By using this formula I would like to use the auto fill feature to update
the folder/file references.

I have literally thousands of excel files that i need this master workbook
to link to. Entering in the values manually will take far to long to do.

Please help




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default formula/autocomplete to link data from other worksheets

Andrew,

Well, I did not have your folder and file structure available for testing.
;-)

To fix the code so that it works, open one of your files, create a working
link to that sheet and cell, then close the file to get Excel to show the
entire path in the link. Copy the link as text (use F2, then select the
whole formula) and paste it into your code, surrounded by quotes. Then try
your code, without modification of the formula. You should end up with,
basically, this:

Sub Test()
Dim myCell As Range
For Each myCell In Selection
myCell.Formula = _
"=WORKING LINK FORMULA FROM CELL"
Next myCell
End Sub


When you get that to work, begin replacing the bits that correspond to the
contents of the cells in column A and column B (file path and name?) with:

" & Cells(myCell.Row, 1).Value & "
or
" & Cells(myCell.Row, 2).Value & "

then try the code again, making sure that you are on the correct row when
you run the code.

HTH,
Bernie
MS Excel MVP


"Andrew" wrote in message
...
Thanks for the quick response

I am getting a syntax error with this formula

I am using excel 2003 - if that helps

"Bernie Deitrick" wrote:

Andrew,

Select cell C169, and run this macro:

Sub MakeLinksForAndrew()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='W:\Projects\" & Cells(myCell.Row, 1).Value & " " & _
Cells(myCell.Row, 2).Value & "\Financial Information\Monthly
Summaries\[" & _
Cells(myCell.Row, 1) & "&" Monthly Summary.xls]Sheet1'!$F$12)"
Next myCell
End Sub

are created.

HTH,
Bernie
MS Excel MVP

"Andrew" wrote in message
...
I need help writing a formula that will link a workbook file with
thousands
of other workbooks files by using a formula using a standard file name
convention.

Here is the standard file naming convention:

'W:\Projects\ &A169 &" " &B169 & "\Financial Information\Monthly
Summaries\[" &A169 &" Monthly Summary.xls]Sheet1'!$F$12)

By using this formula I would like to use the auto fill feature to
update
the folder/file references.

I have literally thousands of excel files that i need this master
workbook
to link to. Entering in the values manually will take far to long to
do.

Please help






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 358
Default formula/autocomplete to link data from other worksheets

I fixed the compile error

I think there was an extra &" in your macro third line from the bottom

However now i am getting an application defined error

I double checked the file and path info and it's all ok and works fine when
entered manually.

Do you know what could be going on here?

Again, thanks for your help
"Andrew" wrote:

Thanks for the quick response

I am getting a syntax error with this formula

I am using excel 2003 - if that helps

"Bernie Deitrick" wrote:

Andrew,

Select cell C169, and run this macro:

Sub MakeLinksForAndrew()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='W:\Projects\" & Cells(myCell.Row, 1).Value & " " & _
Cells(myCell.Row, 2).Value & "\Financial Information\Monthly
Summaries\[" & _
Cells(myCell.Row, 1) & "&" Monthly Summary.xls]Sheet1'!$F$12)"
Next myCell
End Sub

are created.

HTH,
Bernie
MS Excel MVP

"Andrew" wrote in message
...
I need help writing a formula that will link a workbook file with thousands
of other workbooks files by using a formula using a standard file name
convention.

Here is the standard file naming convention:

'W:\Projects\ &A169 &" " &B169 & "\Financial Information\Monthly
Summaries\[" &A169 &" Monthly Summary.xls]Sheet1'!$F$12)

By using this formula I would like to use the auto fill feature to update
the folder/file references.

I have literally thousands of excel files that i need this master workbook
to link to. Entering in the values manually will take far to long to do.

Please help






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 358
Default formula/autocomplete to link data from other worksheets

Got it to work! Please ignore all follow up posts my me above

Thanks!

"Bernie Deitrick" wrote:

Andrew,

Select cell C169, and run this macro:

Sub MakeLinksForAndrew()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='W:\Projects\" & Cells(myCell.Row, 1).Value & " " & _
Cells(myCell.Row, 2).Value & "\Financial Information\Monthly
Summaries\[" & _
Cells(myCell.Row, 1) & "&" Monthly Summary.xls]Sheet1'!$F$12)"
Next myCell
End Sub

are created.

HTH,
Bernie
MS Excel MVP

"Andrew" wrote in message
...
I need help writing a formula that will link a workbook file with thousands
of other workbooks files by using a formula using a standard file name
convention.

Here is the standard file naming convention:

'W:\Projects\ &A169 &" " &B169 & "\Financial Information\Monthly
Summaries\[" &A169 &" Monthly Summary.xls]Sheet1'!$F$12)

By using this formula I would like to use the auto fill feature to update
the folder/file references.

I have literally thousands of excel files that i need this master workbook
to link to. Entering in the values manually will take far to long to do.

Please help




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default formula/autocomplete to link data from other worksheets

Great! Thanks for letting us know that you worked it out.

I had a problem with my first post: I had noted that if you select all the
cells in column C where you want to have links, the code will cycle through
all of the cells that are selected, creating a link in each one.

Somehow, I deleted that part just before I sent the message :-(

Bernie

Got it to work! Please ignore all follow up posts my me above

Thanks!



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
sorting 2 colums of numbers and incremening them down blk&wht Excel Discussion (Misc queries) 10 October 9th 06 10:12 PM
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 PM
Create single chart with data from seperate worksheets MATT Charts and Charting in Excel 1 May 10th 06 04:09 AM
Update data automatically among worksheets Leo Excel Discussion (Misc queries) 1 May 4th 06 04:46 PM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM


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

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"