Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steve D
 
Posts: n/a
Default formula referencing another workbook

Hello, I am trying to create a formula that references another spreadsheet. I
am able to do this at a manual level but what I am really looking to do is to
list a number of file names on one sheet and have the formula pull the file
names from that sheet and insert it into the reference formula. Here is an
example of what I have tried that has not worked:

=IF(ISERROR('[ Sheet1!E3 ]Approval Summary'!$C$13),0,'[ Sheet1!E3
]Approval Summary'!$C$13) + IF(ISERROR('[ Sheet1!E4 ]Approval
Summary'!$C$13),0,'[ Sheet1!E4 ]Approval Summary'!$C$13)

Where Sheet1!E3 would hold something like "abc.xls" If anyone can help with
this I would greatly appreciate it.

Thank You,
Steve
  #3   Report Post  
GerryK
 
Posts: n/a
Default

This may not be exactly what you are looking for but this
code may help you. It is inserted Alt F11 into MEO sheet...
Adjust line 12 and 34 to state your specific drill to your
Excel files on your computer.

Dim FSO As Object
Dim cnt As Long
Dim arfiles
Dim level As Long

Sub Folders()
Dim i As Long
Dim sFolder As String

Set FSO = CreateObject("Scripting.FileSystemObject")

arfiles = Array()
cnt = -1
level = 1

sFolder = "C:\Documents and Settings\MY OWN PATH!!!"
ReDim arfiles(1, 0)
If sFolder < "" Then
SelectFiles sFolder
Worksheets.Add.Name = "Files"
With ActiveSheet
For i = LBound(arfiles, 2) To UBound(arfiles,
2)
.Hyperlinks.Add Anchor:=.Cells(i + 1,
arfiles(1, i)), _
Address:=arfiles(0,
i), _
TextToDisplay:=arfiles
(0, i)
Next
.Columns("A:Z").EntireColumn.AutoFit
End With
End If

End Sub

'----------------------------------------------------------
-------------
Sub SelectFiles(Optional sPath As String)
'----------------------------------------------------------
-------------
Dim fldr As Object
Dim Folder As Object
Dim file As Object
Dim Files As Object

If sPath = "" Then
Set FSO = CreateObject
("SCripting.FileSystemObject")
sPath = "c:\\Documents and Settings\MY OWN PATH"
End If

Set Folder = FSO.GetFolder(sPath)

Set Files = Folder.Files
For Each file In Files
cnt = cnt + 1
ReDim Preserve arfiles(1, cnt)
arfiles(0, cnt) = Folder.Path & "\" & file.Name
arfiles(1, cnt) = level
Next file

level = level + 1
For Each fldr In Folder.Subfolders
SelectFiles fldr.Path
Next

End Sub


Then try calling the information up using Sheet1!A1 for
example.

I'm using this code and it was supplied from this forum.
Sorry, the original author credit is buried somewhere in
my work!
HTH

-----Original Message-----
Hello, I am trying to create a formula that references

another spreadsheet. I
am able to do this at a manual level but what I am really

looking to do is to
list a number of file names on one sheet and have the

formula pull the file
names from that sheet and insert it into the reference

formula. Here is an
example of what I have tried that has not worked:

=IF(ISERROR('[ Sheet1!E3 ]Approval Summary'!

$C$13),0,'[ Sheet1!E3
]Approval Summary'!$C$13) + IF(ISERROR('[ Sheet1!E4 ]

Approval
Summary'!$C$13),0,'[ Sheet1!E4 ]Approval Summary'!

$C$13)

Where Sheet1!E3 would hold something like "abc.xls" If

anyone can help with
this I would greatly appreciate it.

Thank You,
Steve
.

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
Relative Indirect Formula Referencing? Damian Excel Worksheet Functions 1 January 7th 05 04:16 AM
make hidden window or workbook visible without specify the name mango Excel Worksheet Functions 1 December 30th 04 03:05 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
Indirect references in a linked formula Markshnier Excel Worksheet Functions 1 November 15th 04 02:49 AM


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