External File(s) Referenced And File Links Change Based On Row Cell

Oct 22, 2009

I have attached the file I am working on. I am attempting to create a link to an external file based on the value of cells in column A. Then I would like to simply copy the formula down, lets say in Column B, the rows and as I do the external file reference will change depending on the value within the cell in Column A. I hope that I am making sense.

I am using Windows Vista with Excel 2007. The files will all be within the same file folder, however, there are hundereds of files so I won't be able to open them all for the indirect to work.

View 9 Replies


ADVERTISEMENT

Variable File Name For Creating External Links

Apr 10, 2013

I am working on a research project of which details cannot be disclosed. I basically have many worksheets which each contain 3D positional data and I am plotting overlaid graphs using multiple worksheets. I have gotten them to work where I manually enter the names of the worksheets, but I am trying to use the CELL("filename") command to get the current worksheet's name, then using a substitute command to change certain fields, then I would like to use the string name created by those functions to call a global variable in another worksheet which defines a range. I will try to give an example.

Say I have 3 worksheets for arbitrary measurements:
1) filename 1mm
2) filename 2mm
3) filename 3mm

I would like to graph all 3 sets of data in worksheet "filename 1mm", using the fact that everything in the filenames are the same except for the 1/2/3mm part. I have a template of which I will be copy/pasting data from numerous data sets and then each worksheet has defined names "X_vals" and "Y_vals" which give me dynamic ranges for the data I wish to plot from that worksheet.

When I type the names manually--i.e. " 'filename 2mm'!X_vals" everything works fine, but when I try to create the exact same string dynamically using indirect/substitute/left/right etc, it does not let me do it. I am able to create a dynamic string with a range, such as " 'filename 2mm'!C10:C100" but then when I change it to " 'filename 2mm!X_vals" it just gives me #REF!.

I guess my question is just is there any way to use the indirect function to create a string name dynamically which references a defined name in another worksheet? If not possible with just simple excel functions, is there a way to do this with a macro? I am not exactly familiar with VBA in excel, though I know how to run macros.

View 3 Replies View Related

Automatically Update External Links To Csv File In 2007

Jan 28, 2010

I have an Excel 2003 workbook (named TargetWorkbook.xls) with some links to a CSV file called DataSource.csv. I use Excel 2007 to open the workbook. I checked the "Update links to other documents" option under the "When Calculating this workbook..." section on the Advanced pane of the Excel Options window. I unchecked the "Ask to update automatic links" option under the "General" section on the Advanced pane of the Excel Options window. I selected the "Don't display the alert and update links" option on the Startup Prompt dialog (accessed from the Edit Links dialog) I created a simple Auto_Open macro with the following statements:

Sub Auto_Open()
Workbooks.Open Filename:="C:ProjectsExcelTestDataSource.csv", ReadOnly:=True
Worksheets("DataSource").Activate
Workbooks("TargetWorkbook.xls").Activate
Windows("DataSource.csv").Visible = xlVeryHiidden
End Sub

The DataSource.csv file is updated daily. I want the cells of TargetWorkbook.xls to automatically update from the csv file when I open TargetWorkbooks.xls without displaying a prompt. I plan to deploy this workbook to a server and open it programatically via a Windows Service (I know, I know, Microsoft doesn't encourage this)and can't have it throwing up a user dialog.

Here is the problem: When I open TargetWorkbook.xls manually using Excel 2007, it updates the links but throws up the dialog "This workbook contains one or more links that cannot be updated...". When I click on the "Edit Links..." button, it displays the message "Warning: Open source to update values". When I click the "Check status" button for this link, it says "Source is open". How do I prevent this dialog box from poping up? I've been wrestling with this for a few
days now and can't find a solution.

View 2 Replies View Related

Log UserID Of Person Who Last Made Update In External File Links

Oct 2, 2006

Is there a way to log the userid of the person who last made an update in the external file links?

View 4 Replies View Related

Excel 2010 :: Locate And Eliminate Links To External Sources Referenced By Worksheet

Feb 15, 2013

Upon opening after "Enable" is selected the workbook attempts to locate several nonexistent pieces of data, either internet based files or network based files. Requested data appears to be about 11 years old and would not be applicable it located.

Edit Links shows the location of the requested files, i.e., E:filename but does not show the location within the document that causes this request. A search for "E:" does not locate text in any worksheets.

The question is how to delete or turn off this problem which slows opening, saving, and recalculation of a large multiple worksheet workbook.

View 1 Replies View Related

Replace All To Change A Referenced File Name

May 28, 2014

I am working on a spreadsheet that will be referencing approximately 20-30 separate workbooks which all have identical sheet / column structure and have a consistent file naming convention. ("###-YYYY") Since, this is referencing separate files and not sheets with this workbook, I cannot use INDIRECT. However, I should be able to use index / match referencing provide instructions for users to copy a set of cells down and the globally change the file name. The problem is that the file directory pops up with each instance and the user has to manually select or confirm the file.

There would be approximately 15 cells with a formula similar to this example and would want to change the two instances of "403" to a new 3-digit code, say "444". Then as each year cycles over, we'd want to change all instances of 2014 to 2015.

=INDEX('C:Users
lagraffDownloads[403-2014.xlsx]Forecast Budget'!$D$15:$D$48,MATCH($P$2,'C:Users
lagraffDownloads[403-2014.xlsx]Forecast Budget'!$B$15:$B$48,0))

Any settings in Excel, or known tricks, so the user won't have to continuously click on the file and the find/replaces executes at each instance?

View 1 Replies View Related

How To Manage New Year File Name Change When Linked To External Workbooks?

Nov 12, 2009

I have a set up a workbook which is linked to numerous other workbooks to provide a summary of information in one location.

However, when we reach April the names of all the linked worksheets will change from 'name 09 - 10' to 'name 10 - 11'.

What is the best way of handling this transition, will I have to manually change all of the links?

I have attached a much simplified example, unfortunately I cannot post the original due to sensitive data.

Apologies if the explanation isnt clear enough, let me know and I'll give further detail.

View 2 Replies View Related

File Name To Be Added In Referenced Cell

Mar 27, 2013

I have 15 files in a folder and need vba code which would open every file from the specified folder and add that file name in the row starting cell "D1" in the "Master File". Below is the code which opens the file from the folder, but need the updated code which will add the opened file name. Also can u pls update this code to not open the "Master file" which is in the same folder when it loops..

VB:
Sub Login_summary()
Dim MyPath As String, FilesInPath As String
Dim MyFiles() As String
Dim Fnum As Long

[Code] ....

View 5 Replies View Related

Lookup File Referenced From Other Cell

Jan 2, 2008

I have a basic blank file which takes production volumes of a product as an input and breaks the figure down to give individual component usage as an output. It then uses this figure to tell the user the best configuration to hold stock.

This file is 'save as' each month as the month, year and filename (ie: 11.2007MPS.xls, 01.2008MPS.xls) and then the monthly production figures are entered.

Within this file there are 'comparison' worksheets, cells on this page look into the previous months file and tell the user where changes have occurred; showing the physical changes that should be made. This lookup is referenced to a cell that gives the previous month ('MPS INPUT'$D$13), this is filled in by the user.

At current I am using the Vlookup(Indirect formula:
=(VLOOKUP(B4,INDIRECT("'I:SCIPMPS["&'MPS INPUT'!$D$13&"MPSCOPY.xls]Row 2'!$A$2:$N$100"),5,FALSE))

Yet, this requires all the previous months’ files to be open which isn't really feasible in the long run. Solving this issue using custom 'add-ins' (as i believe have) is not feasible either since the file will be used by many users who are not amazingly I.T literate.

View 6 Replies View Related

Change/Edit External Links

Dec 12, 2007

Is it possible to update external links on a worksheet via running a macro?
I have a worksheet where some cells have external links to other files, and every month I have to scroll through and do the typing in order to have everything up and running.
A typical cell has formulas like =[E:ReportsAug-2007.xls]Data!F25
Another cell =[E:ReportsAug-2007.xls]Data!F43
and so on.

Every new month I actually have to replace all [E:ReportsAug-2007.xls] occurrences with for example [E:ReportsSep-2007.xls]. So, is it possible to have a macro which opens a textbox of which i can type the new month 'Sep', so that when the macro runs I save all the typing?

View 3 Replies View Related

Get Data From Cells In External File - File Name Changes Daily

Aug 1, 2014

I have a file that gives some statistical data to my co-workers every 15 minutes. A common question I get is "How does that compare to last week?" Then I have to open the file from 7 days ago, find the data from the same time interval, and subtract it from this week's number in my head. I'd like to have excel do this for me.

I know how to get data from an external file. The problem is, these files are named with a date on the end of the file name. So tomorrow, the static formula won't work anymore (or rather, it will give data for a file from 8 days ago, instead of 7). I'd like to excel to use today's date, find the file from 7 days ago, and get the data from that file to compare to the current file.

Here's what I've done so far:

Code:
ThisDate = Range("C1").Value 'the cell with todays date in it
ThisDateName = Format$(ThisDate, "yyyy-mm-dd") 'now formatted the way I need it
ThisDate7 = Range("G1").Value 'the cell with the date 7 days ago
ThisDateName7 = Format$(ThisDate, "yyyy-mm-dd") 'formatted correctly
ThisDate14 = Range("G2").Value 'the cell with the date 14 days ago
ThisDateName14 = Format$(ThisDate, "yyyy-mm-dd") 'you know, in case of a holiday 7 days ago

I have no clue what to do next. I want Excel to: Use "ThisDateName7" to find the file with the name "pph_tracker_[ThisDateName7].xlsm"Get data from a cell in that file (say, C15)Subtract it from the data in the same cell (C15) in today's file (this week - last week)Give me the result in today's file (say in cell C20)Do that again for cells D15, E15, and so on (result in D20, E20, etc)

I assume I can figure out the rest from there. Can I use the variable names in an actual formula in cell C20? Something like:

=C15 - '[pph_tracker_{ThisDateName7}.xlsm]Sheet1'!C15
or even
=C15 - '[pph_tracker_{The Date in Cell $G$1}.xlsm]Sheet1'!C15
which would require no macros at all!

View 3 Replies View Related

Formula To External File, Requires File To Be Open

Jun 12, 2006

I've got a couple of formulas in a workbook which lookup values in another workbook. When I reopen the initial workbook the formulas results come back as errors (i.e. #VALUE!) unless the workbook it is looking at is also open. This is not desirable, does anyway know how I can lookup values in another workbook which are not open? The formula which is causing me problems is as follows:

= SUMIF( 'H:Infozoom[2006-01_assy.xls]New Table1'!$F:$F,$A8,'H:Infozoom[2006-01_assy.xls]New Table1'!$AH:$AH)/60

View 2 Replies View Related

Link To External File With Changing File Name

Jun 12, 2007

Basically I want to point my Excel sheet to a bunch of external Excel files. To get data from an specific cell (in this case, cell F10) of the external file, all I have to do is this: ...

View 9 Replies View Related

Excel 2013 :: Playing WAV File Based On Cell Value Change

Aug 6, 2014

I have a spreadsheet with a database query attached (refreshing every 60 seconds) showing a stock summary by product.

I need the spreadsheet to play a .WAV file when values change. i.e.;

If cell A1 <6, play sound1.wav
If cell A2 <6, play sound1.wav
If cell A3 <6, play sound2.wav
If cell A4 <6, play sound2.wav

This may need to be repeated several times based on certain criteria. I have a total of about 30 cells which I need to be looked at individually (not a sum of) and to play the relevant sound.

I have seen different people try to tackle this in different ways. The ideal way would be creating alarms in VBA and triggering them using a formula, but I cannot get these to work in Excel 2010 or 2013.

View 6 Replies View Related

Formula To Call Variable File Name In Cell Links

Mar 3, 2007

The master has rows corresponding to numbered files:
4300 | CellValue1 | CellValue2 | etc
4301 | CellValue1 | CellValue2 | etc

In attempting a simple formula (a couple VBA codes I tried did not work and were probably substantially more than I needed anyway), I made the following:

='CMain FolderSub Folder[concatenate(cell w/file number,".xls")]Sheet1'!A1
This is identical to the copy/paste link formula currently in use except that I am trying to have the actual file number/name generated off the master list instead of what is in the file itself.

Purpose: in case I was not clear on this above, I am trying to automatically populate the master worksheet with the data from the workbook. The current procedure is to copy a line of the data from the workbook, then paste as a link in to the master worksheet on the row corresponding to the file number.

View 6 Replies View Related

Save Each Worksheet As PDF File And Name Each File Based On Cell Value In Each Sheet

Jul 10, 2014

I have a Workbook that already has a macro in it that will generate multiple sheets based on certain criteria.

For each of these newly generated sheets (numbered 1-6 in the attached example), I need to be able save each of them to a PDF file based on a unique name contained in a certain cell (in this case, each named is referenced in cell Q1 of each sheet). As such, I should end up with 6 pdfs based on the attached sample files.

The PDFs would ideally need to be landscaped and should be just 1 page per sheet.

In my attached sample workbook, you'll notice that I have a "PracticePrint" macro that doesn't quite get the job done. One other criteria involves not printing any sheet with the characters "1010" in it (my PracticePrint macro is setup to do that, but it fails to do much else).

View 1 Replies View Related

Stop Working Out File Paths For Referenced Workbooks....?

Apr 29, 2009

I'm working on a sheet which references a sheet in another workbook. I want to refer to the other workbook simply by it's filename (Forecast.xls) but whenever I save and reopen Excel has replaced the filename with the full path (C:Documents and SettingskoconnorMy DocumentsAuto-sheet project[Forecast.xls])

This is quite inconvinient as I am eventually going to want to move both workbooks together to a different location. Is there a way to make Excel stop working out full file paths and just look for the filename in whichever folder the active sheet is sitting in?

View 3 Replies View Related

Adjusting External Cell Reference (Links) In Excel

Aug 7, 2013

The goal is to have a data validation drop down list that adjusts the File.xls name portion of the external cell reference (example given below) and return the result of the cell I am searching in the new file after updating my links.

I am trying to set up an external cell refence within my workbook for example:
='[File.xls]Tab'!$C$9

When I have tried setting the equation to pull from the drop down list in cel A1 for example:
="'["&A1&"]Tab'!$C$9"

It only shows the new file path name and not the value in the new sheet--even after updating links.

I am also attempting to do this using the my network places file path instead of the letter drive in my computer.

View 2 Replies View Related

Change Column Referenced In Formula Based On Date

Dec 12, 2013

I'm trying to create a list that references an existing data set where I have staff listed month by month and based on today's date, imports only if there is data in that column. I have figured out how to check if the cell is blank or not, but what I want to do now is change the cell that is referenced in the formula based on the date. Here is the format of the spreadsheet I'm working with:

A
B
C
D
E
F
G
H

[code].....

In this case, the "Team 1" and "Team 2" and "Team 3" references what team they are on that month. If it is blank, they aren't with the company any longer. The formula I am using is intended to import this data elsewhere, and is formatted like this:

=IF(ISBLANK(B2), "", A2) - My understanding is that this checks to see if B2 has data, and if it does, it inputs the employee name (A3) in that cell.

My ultimate goal is to be able to change the column referenced after the "isblank" calculation based on the date. So if today is April 2013, I want it to check B2, but if it's December 2013, I want the formula to check J2. Is there a way to do this? I don't mind if it's two steps (like if I have to put the date somewhere in the spreadsheet in order to run the calculation), but ultimately it would be the type of thing I could do that would leverage the existing data set so that I don't have to maintain two different spreadsheets of information.

View 2 Replies View Related

Link To External CSV File?

May 16, 2013

My raw data is exported in CSV format. Is it possible for Excel to link to the data or can it only link to an Excel format workbook?

View 1 Replies View Related

Run Macro On External File

Nov 20, 2011

I have file name "WM" from where I want to run macro and want that It open a File let say "test" & do the rest of the functions. like if I have following code how can it possible.

"TML" sheet is on file "WM" and "MD" sheet is on file "test".

Code:

Sub Copy_on_backup_file()
Workbooks.Open Filename:="C:UsersBinDesktop est.xls"
'*** Select the destination cell
With Sheets("TML")
LR = .Range("A" & Rows.Count).End(xlUp).Row
Range(.Cells(3, 1), .Cells(LR, 3)).Copy Sheets("MD").Range("B" & Rows.Count).End(xlUp).Offset(1)
End With

[Code]...

View 6 Replies View Related

Open External File

Mar 7, 2008

I have a userform which saves project details....

Part of the makeup of the userform is a label control (label11) which can store a filepath for an external file (word doc, PDF etc)

How can i open this external file? (the filepath is stored as the caption)

View 9 Replies View Related

Extracting Value From External File

Jan 29, 2004

I have been trying something like this before, i could not get it fixed. Let's give it another go:

I have a number of files in a specific folder. I need to extract values from cell Sheet1!G42 out of [b]every file[b] in this folder. Problem that occurs, is that I do not know how many files are in this folder, neighter do I know what the filenames are. I need some magic to perform extraction of the desired values.

As for the files in the specified folder I have this VBA code, that suits my needs just fine:

Private Sub Workbook_Open()
Dim fileList() As String
Dim fName As String
Dim fPath As String
Dim I As Integer

This code will display all found files, including their path in column AD. (as plain text)
[b]Question that remains:[b] how am I to fix a formula In (column AE) that will extract the value found in Sheet1!G42 of each file? This must be very easy, but i can’t get this to work….

View 9 Replies View Related

Links To A File In My Documents

Aug 21, 2009

I have a template that I wish to distribute to others. It will link to a second file (also distributed by me) that will be in each users' "My documents" folder (or "Documents" in Vista). I currently have the template set to look at "C:" as that is common for everyone. Turns out that creates other problems. However, now each user's file location will be unique due to the path of their documents folder

Question, is there a robust way to automate the finding of the linked file in the template without having each user "relocate" it? Reason is the template will be updated frequently and I want to ease their pain by not making them go through this every time.

View 9 Replies View Related

Change File Path Name In VBA Code Based On Files Location

Mar 11, 2014

I have the following code written but I'm wondering if it's possible to modify this to change the red line to update to the path that the workbook is saved in? Meaning that User1Folder1 would change but [Workbook1.xlsm]Sheet1'E1 would always be the same.

[Code] .......

View 2 Replies View Related

Copy And Paste From External File

Jan 20, 2009

I am trying copy and paste data from an external file. The steps I am using to get data are as follows:

1. open external file
2. copy desired data from external file (any number of rows & columns)
3. close the external file
4. paste data starting with designated cell.

The code works fine up until the part of the code where I want to paste special (I need to preserve cell formatting). Error is "PasteSpecial method of Range class failed". No sure why code doesn't work at this point.

View 9 Replies View Related

Importing Data From External File

Apr 13, 2009

I have bit of code that opens an external excel file (call it the source workbook), grabs certain data, copies the data to other excel file (call it the destination workbook), and then closes. I have most of the code completed but am running into an issue with how to grab certain data from the source workbook and copying it to destination workbook.

I want the code to read the data in the source workbook line-by-line.

For each line that is read, I want to copy part of that data (value in column A and column B) to column A and column B of destination workbook only if the value in column D is equal to “Block”. For column C and column D, I want to do some form of lookup, being I want the code to look at each line of data until it finds corresponding line in which column A = “60612105” and in which column B = the value in B. Once this line is found, copy the value in C to column C of destination workbook and value in D to column D of destination workbook.

I have attached two files. First file is the import file (destination workbook) which has two tabs; (1) import tab (2) desired result. Second file is the raw data file (source workbook). Hopefully this makes since.

View 8 Replies View Related

Test Whether Or Not An External File Exists?

Sep 15, 2009

Is there a way to test (from Excel 2002) whether a specified file (not necessarily an Excel file) exists on my computer? I could specify the complete path.

View 4 Replies View Related

Dropdown List From External File

Mar 12, 2009

I have created a scorecard which has 4 key drop down lists:

- Site, Coach, Team and Agent

Coach and Team populate the dropdowns dependant on which site is selected and Agent is based on which team is selected.

I have created an external file called dropdowndata.xlsx as the main source. This file has two sheets. Sheet 1 (dropdowndata) is the main Site, Coach and Team data and then Sheet 2 (GLAteam) contains the linking Team and Agent data.

The drop down lists are based on a number of named ranges and lookups.

So the issue I am having is that the drop down lists only work if I have the dropdowndata.xlsx file open on my laptop.

Is there anyway to get this to work without having to actually open the file?

View 9 Replies View Related

Excel File Won't Break Links?

Jul 16, 2014

I copied 2 worksheets from one file to another and went in to "Edit Links" and changed the source to itself rather than the original file which took away those links in the cells that the original file was present in, but it still gives me a dialogue when opening the file that links to the original file. I go back to "Edit Links" and press "Break Link" but it doesn't seem to remove the link to the original file. If I click on "Connections", none are present. I clicked on "Startup Prompt" and set it so that it wouldn't annoy me with the prompt any more, but I'd ideally like to not have any reference to the original file.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved