Can I show server name instead of drive letter?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When using the =Cell("filename") function, I would like to show the actual
server instead of a drive letter because the letter is dependent on where the
server is mapped and not all users have the same mapping. Is this possible?
 
Try using:
\\ServerName\drive\...
where ServerName is the name of the server and drive is the appropriate
drive, and then find the file on the drive from that point.
 
And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)
 
I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.
 
Did you try Chad's suggestion of opening the file by traversing the UNC
path--not the mapped drive?

(I don't have a network to test it on.)
I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.

Dave Peterson said:
And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)
 
I do not want to open the file, instead I want to show the filename when the
file is printed (except instead of the drive letter, I want to see the
server). I have used macros to do this in the past, but I do not want to
have to do this in the future.
Dave Peterson said:
Did you try Chad's suggestion of opening the file by traversing the UNC
path--not the mapped drive?

(I don't have a network to test it on.)
I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.

Dave Peterson said:
And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)

bfant wrote:

When using the =Cell("filename") function, I would like to show the actual
server instead of a drive letter because the letter is dependent on where the
server is mapped and not all users have the same mapping. Is this possible?
 
Don't you have to open the file to print it?

If you just rightclick, Print (from Explorer), make sure you're looking at the
file via the UNC path.
I do not want to open the file, instead I want to show the filename when the
file is printed (except instead of the drive letter, I want to see the
server). I have used macros to do this in the past, but I do not want to
have to do this in the future.
Dave Peterson said:
Did you try Chad's suggestion of opening the file by traversing the UNC
path--not the mapped drive?

(I don't have a network to test it on.)
I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.

:

And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)

bfant wrote:

When using the =Cell("filename") function, I would like to show the actual
server instead of a drive letter because the letter is dependent on where the
server is mapped and not all users have the same mapping. Is this possible?
 
This did in fact give me the results I am looking for. However, it is very
time consuming and could be confusing for some people. I would think that
there would be someone that could develop an add-in that would give the
results I am looking for.

Dave Peterson said:
Don't you have to open the file to print it?

If you just rightclick, Print (from Explorer), make sure you're looking at the
file via the UNC path.
I do not want to open the file, instead I want to show the filename when the
file is printed (except instead of the drive letter, I want to see the
server). I have used macros to do this in the past, but I do not want to
have to do this in the future.
Dave Peterson said:
Did you try Chad's suggestion of opening the file by traversing the UNC
path--not the mapped drive?

(I don't have a network to test it on.)

bfant wrote:

I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.

:

And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)

bfant wrote:

When using the =Cell("filename") function, I would like to show the actual
server instead of a drive letter because the letter is dependent on where the
server is mapped and not all users have the same mapping. Is this possible?
 
It seems non-trivial to me.

But maybe you could parse each cell looking for a letter followed by a
colon--but you'd have to hope that it was actually referring to a drive.

Then you could use some API functions to translate that letter to its
appropriate UNC path.

And be careful. Formulas are limited to 1024 characters when measured in R1C1
reference style.

For me, I think I'd just make that extra effort to open it via the UNC path.
(Maybe even make a shortcut to that folder (or directly to the file).)

I keep a folder on my desktop that contains lots of shortcuts to files--most of
those shortcuts use the UNC path. It works ok for me--maybe you could use that
idea, too.


This did in fact give me the results I am looking for. However, it is very
time consuming and could be confusing for some people. I would think that
there would be someone that could develop an add-in that would give the
results I am looking for.

Dave Peterson said:
Don't you have to open the file to print it?

If you just rightclick, Print (from Explorer), make sure you're looking at the
file via the UNC path.
I do not want to open the file, instead I want to show the filename when the
file is printed (except instead of the drive letter, I want to see the
server). I have used macros to do this in the past, but I do not want to
have to do this in the future.
:

Did you try Chad's suggestion of opening the file by traversing the UNC
path--not the mapped drive?

(I don't have a network to test it on.)

bfant wrote:

I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.

:

And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)

bfant wrote:

When using the =Cell("filename") function, I would like to show the actual
server instead of a drive letter because the letter is dependent on where the
server is mapped and not all users have the same mapping. Is this possible?
 
I would agree that it is non-trivial, but when dealing with more than a dozen
individuals in different locations and using several different servers, it
becomes a bigger issue. When all of the work is complete and the hard copies
are filed, it would be nice to know exactly where to find the file if needed.
And, even though it only takes a few minutes to use Explorer, when there are
multiple files (and not all in the same location, so shortcuts would be of
limited value), the time adds up.

However, as I wrote earlier, I have used a macro to do this before and after
talking to a co-worker learned that I can save my macro as an add-in on the
network so other people can load it and use it as well. If you are
interested in this, I can post it after I have worked out some of the bugs.


Dave Peterson said:
It seems non-trivial to me.

But maybe you could parse each cell looking for a letter followed by a
colon--but you'd have to hope that it was actually referring to a drive.

Then you could use some API functions to translate that letter to its
appropriate UNC path.

And be careful. Formulas are limited to 1024 characters when measured in R1C1
reference style.

For me, I think I'd just make that extra effort to open it via the UNC path.
(Maybe even make a shortcut to that folder (or directly to the file).)

I keep a folder on my desktop that contains lots of shortcuts to files--most of
those shortcuts use the UNC path. It works ok for me--maybe you could use that
idea, too.


This did in fact give me the results I am looking for. However, it is very
time consuming and could be confusing for some people. I would think that
there would be someone that could develop an add-in that would give the
results I am looking for.

Dave Peterson said:
Don't you have to open the file to print it?

If you just rightclick, Print (from Explorer), make sure you're looking at the
file via the UNC path.

bfant wrote:

I do not want to open the file, instead I want to show the filename when the
file is printed (except instead of the drive letter, I want to see the
server). I have used macros to do this in the past, but I do not want to
have to do this in the future.
:

Did you try Chad's suggestion of opening the file by traversing the UNC
path--not the mapped drive?

(I don't have a network to test it on.)

bfant wrote:

I know my original question was vague, so let me be a bit more specific.
When using =cell("filename",a1), the cell will display something like:
(G:\Folder[File]Worksheet.xls )
Instead of the drive letter, which can have any server mapped to it, I would
like the actual server name. I know this can be done using macros, but I
would like to know if there is a formula or add in that will do the same
thing.

:

And you may want to make your formula look more like:

=cell("filename",a1)

Otherwise, your formula will evaluate to the last workbook that was calculated.

You can see this if you have the same formula in A1 of sheet1 of two separate
workbooks.

Window|arrange|horizontal

(Save both workbooks and look at each of the cells after each save.)

bfant wrote:

When using the =Cell("filename") function, I would like to show the actual
server instead of a drive letter because the letter is dependent on where the
server is mapped and not all users have the same mapping. Is this possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top