Dynamic Path

Jul 1, 2008

How do I assign the path of the workbook I currently have active, to open various other files?

I want to make the path for opening various files dynamic. All the files will be saved in the same folder, but in different locations.

View 9 Replies


ADVERTISEMENT

Setting Dynamic Folder Path?

Sep 6, 2013

I made an excel document for my boss with the list of the furniture in an flat that we will rent. The document will be signed by the the guest of the apartment and will be used if anything at the end of the renting period is ruined or is missing. It's kind of insurance. The problem is that next to the cell with the list of furniture I made a list of hyperlink connected to the photos of the furniture. Everything is working on my computer where the photos are in a folder that is contained in "documents" but as soon as I try it in another computer placing the folder again in the document folder it doesn't work. It says "the file is missing". I just realized that I need a dynamic path but today I have to handle the excel file and I don't know how to do it and to change the path of every link with just few clicks I have no time to change photo by photo (there are like 300 pictures).

View 1 Replies View Related

Dynamic Path Based On Cell Value

Mar 20, 2009

I have VBA code with array formula that looks up some values from series of spreadsheets. Which spreadsheet to use depends on the values in another column.

How do I make the formula the same for the whole range as it will substitute the necessary path into itself?

here is an example:

here is a code for VBA:

Range("I2").Select
Selection.FormulaArray = _
"=INDEX('1_Repl'!$C$2:$C$8,MATCH(1,IF('1_Repl'!$A$2:$A$8=H4,IF('1_Repl'!$C$2:$C$80,1)),0))"
Selection.AutoFill Destination:=Range("I2:I535"), Type:=xlFillDefault
******** ******************** ************************************************************************>Microsoft Excel - TEST_LOOKUP.xls___Running: 12.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutI4I5I6I7I8I9=ABCDEFGHIJK11st Spreadsheet     2nd Spreadsheet    2           3Number123  CodeNumberData2  41230.200.2  11230.22Code=1, so 1_Repl.xls 52340.10.10  12340.1  6345000  2345#N/Ahas to refer to 2_Repl.xls 712300.220  3456#N/A  8234000.15  3567#N/Apath has to be dynamic 91230.240.240.24  3678#N/AValue of G2+ "_Repl.xls" 103450.1300       11           1_Repl [HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name boxPLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.

View 9 Replies View Related

Code Dynamic File Path

Jun 14, 2007

I have a question. How to code the filepath name to make sure it change when i move my files from one directory to another. Example:

I need to update 4 files from this directory, but i am moving them to another directory.
FROM
c:documents and settingTesting
TO
The file being able to follow which ever folder.

View 6 Replies View Related

Dynamic Path Names For External Links

Jun 18, 2008

I am designing a spreadsheet for work.

each of the people i work with have their own workbook with their name as the title, John Smith.xls.

There are about 20 of us on the team with their own workbook with the same design.

We record information on these weekly and so there are 20 files in the folder for Week 1, 20 in Week 2 etc.

I want to make a master spreadsheet with will collect all of the information on these sheets and list them on a master spreadsheet every week.

So the external data i am linking to is found in a location like

='C:SpreadsheetsWeek26[John Smith.xls]Sheet1'!$A$1

Here is my problem,

I need the 'Week 26' and the 'John Smith' to be changeable and preferabilly linked to a cell using the INDIRECT formula so I can change all references to Week 26, 27, 28 etc and also change the workbook name it is referencing.

I have attempted to do this in the following way

I broke down the pathname to seperate cells

Cell 1: 'C:Spreadsheets
Cell 2: A reference linking to a cell containing value: Week 26
Cell 3: A reference linking to a cell containing value: [John Smith.xls]
Cell 4: Sheet1'!$A$1

I then used the CONCATENATE formula to link these into a single cell as a text string.

I then tried to use INDIRECT to link to the filemane in the CONCATENATE cell.

This did not work.

I need a way to make parts of the filename variable and linked to one cell.

I also need to do this while the other workbooks are closed.

I have found some information on INDIRECT.EXT which as far as I can make out involves installing mods to Excel to make these work, I cannot do this as the spreadsheet will be used across our network and will eventually be used by thousands of users.

View 11 Replies View Related

Dynamic File Path Depending On Cell Data

May 18, 2007

I think this is possible but cant find anything on it ........

View 9 Replies View Related

VLookup Function Which Takes Data From A Table In Closed File - Dynamic Path

Feb 23, 2012

I have a vlookup function which takes the data from a table in a closed file. A folder where the file would be located will change based on the value in the cell reference.

I used below formula which works, but every time when i drag or try to edit and enter, the path of the file path brokes and i need to reselect the path where the file is located. Is there a way where i can stop this?

Code:

=VLOOKUP(A2,'C:&E1&[Myfile.xls]Sheet2'!$A:$B,2,0)

View 4 Replies View Related

Save Hyperlink Path For File With Absolute Path And Non-Relative?

Mar 4, 2013

is it possible to configure Excel in order to save the Hyperlink path for a file with absolute path and non relative?

I notice that the hyperlink is ....pdf ry.pdf

if I change the position of the file excel there is a problem!

I would like to save es. d:invoichepdf ry.pdf

View 1 Replies View Related

Plan Path And Actual Path Distance Calculation?

Feb 11, 2014

I am using an XY scatter chart that displays the planned path and an actual path as I go. The planned path is set up in 100' increments and goes 12000' and actual path varies along the way.

My data that I use is the Northing (ft), Easting (ft) and Vertical Section (ft) for both the planned path and actual path.

I was wondering if there was an east way to get that information from the chart or if there is a formula that would allow me to calculate distance between the two points by using the data I use for my chart.

View 1 Replies View Related

Macro To Separate File Name And Path From Complete Path

Oct 3, 2012

I want to run a macro to separate File Name and Path from the given complete path

For Example

Code:

In Column A : Given Complete Path " C:MainFolderRecordsSubFilesFile1Record.pdf

I need it separeted like

Code:

In Column B :File Name = Record.pdf
In Column C :File Path = C:MainFolderRecordsSubFilesFile1

Is there any way to do this through a macro

View 2 Replies View Related

Trim Full File Name & Path To File Path Only

Sep 27, 2006

I have a variable ("DestFile") that defines a path to a file (used in saving the file)...

I'm in the process of getting a Sub to hyperlink to this file, but in some circumstances, I may only want to hyperlink to the folder, not the actual file...

How would I go about trimming the "DestFile" address to get a "DestFldr" address?...

An example of "DestFile" might be;
S:BryanFor KenGulf ConstructionST0609014-t.xls
(the file name length may vary)
What code can I use to consistently trim it back to;
S:BryanFor KenGulf Construction
as the "DestFldr" variable?

View 4 Replies View Related

How To Name A Dynamic Range & Make A Validation List (of 2 Dynamic Ranges)

Dec 22, 2009

I have a range which will change in size & in content, & I want this to be a Named Range at whatever size it is.

Reason I want to is because I want to make a Validation List with this dynamic range. I also want a Validation list which lists the content of 2 or more dynamic ranges which may or may not be on the same worksheet - is this possible?

i.e.
First dynamic range: called "Milestones" at A11
Second dynamic range: called "Activities" at A25
& make a Validation list that will list content of both

View 9 Replies View Related

Dynamic Starting Point For Dynamic Named Ranges

Jun 21, 2009

I would like to replace the blue bit of this Dynamic Named Range (DNR) with an INDIRECT formula in order to modify the starting point for the DNR: =OFFSET(DATA!$C$60,0,0,20,1). Unfortunately, I can’t seem to get my INDIRECT formula to work in order to use it to replace the blue bit above: INDIRECT("'"DATA"'!&ADDRESS(MATCH('SHEET1'!AC8,DATA_Date,0)+22,3)"). The orange bit of the formula above returns a value of 60, therefore the ADDRESS formula should return $C$60, that can then feed into the INDIRECT and act as the equivalent of DATA!$C$60. But it doesn’t.

View 2 Replies View Related

Dynamic Data Validation :: Dynamic Lists

Jun 24, 2009

I have a question on the above but can't seem to find a solution. There are two ways that I can find for dealing with dynamic lists via data validation:-

1) Offset and match, cavet being the data must be sorted a-z
2) Have lists for each potential selection

Is there any way to get around 1 without having to do 2? E.g. Got two columns of data, unsorted, and a list from which the user can choose from. The user chooses from the list in first cell, in the second cell require the dynamic list to return all the values accordingly?

View 5 Replies View Related

How To Create Dynamic List Within Dynamic Table

Oct 31, 2013

I have a dynamic table which is linked to a couple of charts. The table must remain dynamic.

I needed to add two new columns to the table, "Focus Area" and "Category". I need a drop down list in the "Category" column to be dependent on the item selected from a drop down menu in "Focus Area".

I can get the first row of the dynamic table to do this.... however; subsequent rows all lock the drop down list in the "Category" column to the same choices regardless of what is chosen in the "Focus Area" list.

Is there a way to make dynamic drop downs within a dynamic table?

View 1 Replies View Related

Get Path To XLA

May 6, 2009

Get Path to XLA ...

View 8 Replies View Related

How To Get Path From GUI

Mar 27, 2012

How to get the get the path from the GUI in Excel-VBA or select the path

and how to declare it as universal...

View 2 Replies View Related

Set Path To Cell Value

Dec 24, 2008

How do I setup MyPath to a cell reference? In this case I need to set MyPath to the cell value of I1

Code that I have that doesn't work...

Sub SaveToFolder()
'Save File to Path
MyPath = I1
ActiveWorkbook.SaveAs Filename:=MyPath & ActiveWorkbook.Name
Windows("PE Console.xls").Activate
End Sub

View 9 Replies View Related

Get A File Path Using Vba

Jun 3, 2004

I'm using this code to import a file, but I want to be able to save just the path (with no file name) to a variable to use for the output file. This code saves the path and file.

FileName = Application. GetOpenFilename _
FileFilter:=Filt, FilterIndex:=FilterIndex, Title:=Title)

Any help would be greatly appreciated. I didn't know but what there was a function that I could apply to the 'FileName' variable that would remove the file name...don't know.

View 9 Replies View Related

Use The Path Of My File

Mar 23, 2005

how can I refere to the path whaere my addin is located without having to write it
i tried with this, but....................

Sub AddingAddIn()
Dim p
p = Application.Path
AddIns.Add Filename:=("path")
AddIns("HTML").Installed = True
End Sub

View 9 Replies View Related

Get Folder Name & Path

Jan 4, 2007

I want to know how to index a drop down list to be used for calculations.

Up until now I was using

Range("B1").Select 'the cell where the drop down list is
ActiveCell.Formula = SiteID 'site id

But for whatever reason it trims a trailing zero from SiteID when setting it in the second line. SiteID is a VBA string.

Indexing it would work, as would preserving the zero so help on either one is appreciated. Auto Merged Post Until 24 Hrs Passes;Correction, I lied. I was using this line to set it.

Range("B1").Select 'the cell where the drop down list is
ActiveCell.FormulaR1C1 = SiteID 'site id

View 5 Replies View Related

Get Rid Of Path In File Name

Apr 26, 2007

How can I get the name of a workbook WITHOUT the path when I have the name WITH the path?

To be more specific. When I use "Application. GetOpenFilename" the result is a file name for say "my_book" including the path. With this I can open the file using "Workbooks.Open" and Excel will show me "my_book". But when I want to reference this workbook later on in say "Workbooks(my_book)", then I need the file name without the path. How can I get that one in VBA?

Till now I was using "CurDir" to find out the path after opening the file and just subtracted it from the full file name. This seamed to be fine. But now I had a situation where CurDir gave me a path with abbreviations (~),

View 9 Replies View Related

Variable For File Name Or Path Name?

Jun 25, 2014

How could i get the below code to work with a variable as the file name?

Or could I use something like "thisfile" to determine where to import to.

[Code] .....

View 5 Replies View Related

Shortest Path Between Cells (VBA)

Mar 2, 2014

I am working on a project to clear festival events with simulation. Therefore I need a grid of Excel cells (the field), let's say 11x11 (B2:L12). And the exit is in cell A7.

I am looking for an algorithm which fills this field with distances to the exit. For horizontal and vertical movements the distance is 1, and for diagonal movements the distance is 1.5

Say I made a class Coordinate which has two points, X & Y I declare a variable point, as the location I am in (the active cell) and a constant exit (the coordinate of the exit)

And then I would like a function in VBA which does:

[Code] ......

How to approach this?

View 6 Replies View Related

Using Cell(s) References In Path

Sep 17, 2009

I'm trying to copy a file from one directory to another directory. However, the source directory, I'd like to have it so it's created from values within specific cells on a Sheet named "PULL".

When trying the following, I get an error permission denied.

View 14 Replies View Related

Save Path Is Incorrect

May 27, 2009

I have the following code, taken from an example off the web. But I would like to change the save path to just C/: rather than copy the save path of the original file...I would also like to not close the active workbook that I am working in....how can i achieve this?

Sub TwoSheetsAndYourOut()
Dim NewName As String
Dim nm As Name
Dim ws As Worksheet

If MsgBox("Copy specific sheets to a new workbook" & vbCr & _
"New sheets will be pasted as values, named ranges removed" _
, vbYesNo, "NewCopy") = vbNo Then Exit Sub

With Application
.ScreenUpdating = False

On Error GoTo ErrCatcher
Sheets(Array("Copy Me", "Copy Me2")).Copy
On Error GoTo 0
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Copy
ws.[A1].PasteSpecial Paste:=xlValues....................

View 2 Replies View Related

How To Incorporate Variable Into Path

Feb 8, 2012

I am using a script within excel as part of this script I want create a new folder to store information

Code:

ChDir "C:Documents and SettingsAdminDesktopMIKEPAYROLL2011-12"

However I want to use a variable called "NEWYEAR" which holds the 2011-12 part

For example this part stays the same

ChDir "C:Documents and SettingsAdminDesktopMIKEPAYROLL

folder 2011-12 held in variable NEWYEAR may or maynot exist.

if the folder exists I want to be able to use the folder, however if it doesn't I need to create it.

The problem is I am not sure how to incorporate the variable into the path.

View 5 Replies View Related

Find Path With Only Having Folder Name

Apr 11, 2012

Is there a way to find a folders path? I have a folder Dropbox

I want to find the path up to this folder on the current computer. Is there a method to accomplish this?

I am fine if you want to give VBA code so I can put it in my immediate window for now and then I can attempt to add it to existing code later.

So an Example of the possible result would be
Directory is C:MyNameUserDropbox
Or on another computer maybe C:User1ListingFilesDropbox

View 9 Replies View Related

Get Current User Path In VBA

Jan 31, 2014

I am using this code to import excel files into one workbook..I have the path hard coded. Is there a way to get this automatically so if another person is running on there machine it will work..

OR

can you define the path in like cell A1 and have it pull from there?

Sub GetSheets()
Path = "C:UserswharnedDownloads"
Filename = Dir(Path & "*.xls")
Do While Filename ""
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True
For Each Sheet In ActiveWorkbook.Sheets
Sheet.Copy After:=ThisWorkbook.Sheets(1)
Next Sheet
Workbooks(Filename).Close
Filename = Dir()
Loop
End Sub

View 3 Replies View Related

Relative File Path VBA?

Feb 28, 2014

I have a WinForm, which I'm calling via VBA's Shell command:

Code:
Sub Button1_Click()
Shell "C:TemplateFuncitons.exe " + ActiveWorkbook.FullName, 1
End Sub

I made this module an Excel Add-in and added it as a button in the quick access toolbar. Now, the idea is for the WinForm.exe and the Excel.xla to always be in the same directory (go hand in hand). I want to make a relative path for the .exe which will be the path to the folder where the .xla is + the string "TemplateFunctions.exe" in the end.

View 5 Replies View Related







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