Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default I need a different formula that can be copied down

I have a worksheet with numbers 1 through 53 in cells A6 thru A58,
respectively.

In cell E6 is the following formula that works and updates without having to
open the reference file:

=INDEX('[01-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

Note: the first two numbers in the formula is the number in A6 written as 01
instead of 1.

I want to copy this formula down to row E58; the formual for
E7 should be:

=INDEX('[02-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

E8 should be:

=INDEX('[03-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

etc.

How can I rewrite the formula in E6 so it can be successfully copied down
without having to open all 53 files?
(I have gotten it to work using the Indirect function €¦ but the Indirect
function worked ONLY if I have the referenced file open; and I dont have
enough memory to open all 53 files at once.)

Your help is appreciated. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default I need a different formula that can be copied down

Unfortunately, you can't. INDIRECT is limited in that the workbook it
references must be open.

Here's a short macro that will create the formulas for you. Note that you
will still need to initially navigate to the workbook, as you are not
providing the full path name. You could get past that by writing the full
path name into the formula, i.e., into the macro (check what a linked formula
path looks like when the external workbook is closed)

'=======
Sub CreateLinks()
Dim r As Range
'Range of cells to place formulas in
Set r = Range("B6:B53")

For i = 1 To r.Count
FName = Format(i, "00")
For Each c In r
c.Formula = "=INDEX('[" & FName & "-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)"
Next c
Next
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"ND Pard" wrote:

I have a worksheet with numbers 1 through 53 in cells A6 thru A58,
respectively.

In cell E6 is the following formula that works and updates without having to
open the reference file:

=INDEX('[01-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

Note: the first two numbers in the formula is the number in A6 written as 01
instead of 1.

I want to copy this formula down to row E58; the formual for
E7 should be:

=INDEX('[02-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

E8 should be:

=INDEX('[03-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

etc.

How can I rewrite the formula in E6 so it can be successfully copied down
without having to open all 53 files?
(I have gotten it to work using the Indirect function €¦ but the Indirect
function worked ONLY if I have the referenced file open; and I dont have
enough memory to open all 53 files at once.)

Your help is appreciated. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default I need a different formula that can be copied down

Thanks.

I guess I could have written the macro, and may use what you've given me.

Was hoping for a formula ...

Thanks again.

"Luke M" wrote:

Unfortunately, you can't. INDIRECT is limited in that the workbook it
references must be open.

Here's a short macro that will create the formulas for you. Note that you
will still need to initially navigate to the workbook, as you are not
providing the full path name. You could get past that by writing the full
path name into the formula, i.e., into the macro (check what a linked formula
path looks like when the external workbook is closed)

'=======
Sub CreateLinks()
Dim r As Range
'Range of cells to place formulas in
Set r = Range("B6:B53")

For i = 1 To r.Count
FName = Format(i, "00")
For Each c In r
c.Formula = "=INDEX('[" & FName & "-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)"
Next c
Next
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"ND Pard" wrote:

I have a worksheet with numbers 1 through 53 in cells A6 thru A58,
respectively.

In cell E6 is the following formula that works and updates without having to
open the reference file:

=INDEX('[01-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

Note: the first two numbers in the formula is the number in A6 written as 01
instead of 1.

I want to copy this formula down to row E58; the formual for
E7 should be:

=INDEX('[02-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

E8 should be:

=INDEX('[03-1209.xls]SFN 119'!$A$13:$C$35,E$64,2)

etc.

How can I rewrite the formula in E6 so it can be successfully copied down
without having to open all 53 files?
(I have gotten it to work using the Indirect function €¦ but the Indirect
function worked ONLY if I have the referenced file open; and I dont have
enough memory to open all 53 files at once.)

Your help is appreciated. 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
Copied formula produces unexpected copied results Robert New Users to Excel 1 December 5th 08 04:11 PM
#N/A displayed when Lookup Formula is copied Rachael F Excel Worksheet Functions 0 February 25th 08 11:48 AM
Copied formula won't calculate Lisar. Excel Worksheet Functions 3 August 1st 07 10:26 PM
Excel formula copied down Pat Excel Discussion (Misc queries) 4 August 25th 05 11:02 PM
I get a 0 value when a formula is copied to another cell arleen a. Excel Discussion (Misc queries) 4 August 9th 05 12:02 AM


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