Linking Worksheets when paths change

debbiefoster

New Member
Joined
Feb 18, 2012
Messages
4
Hello,

I have spent some time googling and searching in this forum for this answer, and I am sure it exists somewhere, but I am not clear on it, so I apologize in advance if this is a newbie question.

I have a folder in Dropbox (important that it is stored there, it is shared with 15 people who are on a bunch of different networks) that contains 15 spreadsheets. One of them is the master, containing performance data for 14 people. The other 14 are for each individual person pulling their performance data from the master. Monthly, the master spreadsheet gets updated, and I want the user spreadsheets to update, so I can email the individual spreadsheets to each person so they can track their performance. Of course, they cannot see each others numbers, so they have no access to the folder. There are a handful of people that have access to the master. All the spreadsheets will live in this folder all the time.

The issue is that on my computer the path to the master is different then it is for other users because of where Dropbox stores local data by default, and for a lot of reasons, I cannot change it.

Is there any way to tell excel that the master (or the other 14) live in the same folder so there is no need for the first part of the path? Or, any other suggestions?

Thank you in advance!

Debbie
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
One folder, on my computer path is C:\Users\Debbie\Dropbox\Commissions

In that folder is an xls file called Master Commissions.xls where all data is entered, for all 14 consultants.

In that folder is an xls file called Alex, and that spreadsheet pulls his performance numbers from the master commissions.xls. When I paste the link, it is looking for the data at the path above.

When someone else opens the Alex spreadsheet, on their computer, they do not have C:\Users\Debbie\Dropbox\Commissions - on their computer, the path is C:\Users\John\Dropbox\Commissions.

So, I want to know if there is a way to tell Excel to just look in whatever folder the spreadsheet was opened from, and find the FILE (not path) called master commissions.xls.

Sorry for the confusion.
 
Upvote 0
Are you using VBA? If so, the following Function will return the user name (i.e. Debbie, John, etc...)

Code:
Private Declare Function GetComputerName Lib "kernel32" _
Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
 
 
Function NTUserName() As String
    Dim rString As String * 255
    Dim sLen As Long
    Dim tString As String
    
    tString = vbNullString
    On Error Resume Next
        sLen = GetComputerName(rString, 255)
        sLen = InStr(1, rString, Chr(0))
        If sLen > 0 Then
            tString = Left(rString, sLen - 1)
        Else
            tString = rString
        End If
    On Error GoTo 0
    NTUserName = UCase(Trim(tString))
End Function
 
Upvote 0
No, unfortunately VB is way above my head. I was hoping their was a simpler way to do it.

Use Alt-F11 to open
Insert Module
Paste all the code in


Then on your worksheet, "=NTUsername()" will return "Debbie" or "John", etc...

You can then utilize that in your worksheet.
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top