Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Shelll
 
Posts: n/a
Default Formula for Excel User Name

Hi

I was just wondering if there was a formula to get the Excel User Name to
print.

I have a document that many users over a network use. At the moment there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well. I have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.


  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

User Defined Function........

Function User()
Application.Volatile
User = Application.UserName
End Function

This function would be copied to a general module in your workbook.

If not familiar with macros and VBA, visit David McRitchie's website on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the above code in there. Save the
workbook and hit ALT + Q to return to your workbook.

In a cell enter =User()


Gord Dibben Excel MVP

On Mon, 23 May 2005 20:32:10 -0700, Shelll
wrote:

Hi

I was just wondering if there was a formula to get the Excel User Name to
print.

I have a document that many users over a network use. At the moment there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well. I have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.


  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User Name to
print.

I have a document that many users over a network use. At the moment there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well. I

have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.




  #4   Report Post  
paul
 
Posts: n/a
Default

=CELL("filename")
=INFO("directory")
might help.

--
paul
remove nospam for email addy!



"Bob Phillips" wrote:


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User Name to
print.

I have a document that many users over a network use. At the moment there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well. I

have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.





  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Would you care to enlighten me as to what this has to do with the question
:-)

Bob

"paul" wrote in message
...
=CELL("filename")
=INFO("directory")
might help.

--
paul
remove nospam for email addy!



"Bob Phillips" wrote:


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User Name

to
print.

I have a document that many users over a network use. At the moment

there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well.

I
have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.









  #6   Report Post  
Harlan Grove
 
Posts: n/a
Default

Gord Dibben wrote...
User Defined Function........

Function User()
Application.Volatile
User = Application.UserName
End Function

....

This only returns the user name entered when Excel or Office was
installed, and in many remote corporate installs that's not the user
name. And in some benighted companies, users are explicitly warned not
to modify this using Tools Options, General tab.

More reliable to use

http://groups-beta.google.com/group/...e=source&hl=en

(or http://makeashorterlink.com/?R2156222B ).

  #7   Report Post  
paul
 
Posts: n/a
Default

At my last place of work i had a printing problem with a spreadsheet on one
of three computers which acessed a quote sheet over the network.I identified
the user by name using one of those formulas and then made some if then
statement sin my macro......
--
paul
remove nospam for email addy!



"Bob Phillips" wrote:

Would you care to enlighten me as to what this has to do with the question
:-)

Bob

"paul" wrote in message
...
=CELL("filename")
=INFO("directory")
might help.

--
paul
remove nospam for email addy!



"Bob Phillips" wrote:


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User Name

to
print.

I have a document that many users over a network use. At the moment

there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well.

I
have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.








  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default

Sorry, I just can't see how filename an d directory give you the user name.

--
HTH

Bob Phillips

"paul" wrote in message
...
At my last place of work i had a printing problem with a spreadsheet on

one
of three computers which acessed a quote sheet over the network.I

identified
the user by name using one of those formulas and then made some if then
statement sin my macro......
--
paul
remove nospam for email addy!



"Bob Phillips" wrote:

Would you care to enlighten me as to what this has to do with the

question
:-)

Bob

"paul" wrote in message
...
=CELL("filename")
=INFO("directory")
might help.

--
paul
remove nospam for email addy!



"Bob Phillips" wrote:


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User

Name
to
print.

I have a document that many users over a network use. At the

moment
there
is a cell in the document that automatically enters todays date

but I
wondered if there was a way to automatically enter the user as

well.
I
have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.










  #9   Report Post  
David McRitchie
 
Posts: n/a
Default

Paul's suggestion for =INFO("directory")
might kind of work if each user keeps their own files on a network drive in
their own area, but chances are if a macro needs to check who is using a file that several
users are using he same file. However, after being challenged it might have
been wiser to check out the other solutions and see what they had to offer.

Also the use of =cell("filename") as supplied is pretty much useless for anything
including the pathname of the active workbook. See paragraphs in italics at the top of
http://www.mvps.org/dmcritchie/excel/pathname.htm
you need to include a reference cell address, and as Bob indicated it does not
answer this question.

Some information on obtaining the userid and related information can be found in
http://www.mvps.org/dmcritchie/excel/userid.htm
but the specific question has already been answered by three people earlier in the thread.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"paul" wrote in message ...
At my last place of work i had a printing problem with a spreadsheet on one
of three computers which acessed a quote sheet over the network.I identified
the user by name using one of those formulas and then made some if then
statement sin my macro......
--
paul
remove nospam for email addy!



"Bob Phillips" wrote:

Would you care to enlighten me as to what this has to do with the question
:-)

Bob

"paul" wrote in message
...
=CELL("filename")
=INFO("directory")
might help.

--
paul
remove nospam for email addy!



"Bob Phillips" wrote:


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User Name

to
print.

I have a document that many users over a network use. At the moment

there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well.

I
have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.










  #10   Report Post  
paul
 
Posts: n/a
Default

sheesh guys i did say MIGHT help,in my limited eperiene the user name was
included in the =info(directory)......I stand corrected :(
--
paul
remove nospam for email addy!



"David McRitchie" wrote:

Paul's suggestion for =INFO("directory")
might kind of work if each user keeps their own files on a network drive in
their own area, but chances are if a macro needs to check who is using a file that several
users are using he same file. However, after being challenged it might have
been wiser to check out the other solutions and see what they had to offer.

Also the use of =cell("filename") as supplied is pretty much useless for anything
including the pathname of the active workbook. See paragraphs in italics at the top of
http://www.mvps.org/dmcritchie/excel/pathname.htm
you need to include a reference cell address, and as Bob indicated it does not
answer this question.

Some information on obtaining the userid and related information can be found in
http://www.mvps.org/dmcritchie/excel/userid.htm
but the specific question has already been answered by three people earlier in the thread.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"paul" wrote in message ...
At my last place of work i had a printing problem with a spreadsheet on one
of three computers which acessed a quote sheet over the network.I identified
the user by name using one of those formulas and then made some if then
statement sin my macro......
--
paul
remove nospam for email addy!



"Bob Phillips" wrote:

Would you care to enlighten me as to what this has to do with the question
:-)

Bob

"paul" wrote in message
...
=CELL("filename")
=INFO("directory")
might help.

--
paul
remove nospam for email addy!



"Bob Phillips" wrote:


thisUser = Environ("Username")

--
HTH

Bob Phillips

"Shelll" wrote in message
...
Hi

I was just wondering if there was a formula to get the Excel User Name
to
print.

I have a document that many users over a network use. At the moment
there
is a cell in the document that automatically enters todays date but I
wondered if there was a way to automatically enter the user as well.
I
have
tried =Username() but this was just wishful thinking.

Any help would be appreciated. Thanks.











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
Multiple Condition Sumif Formula momtoaj Excel Worksheet Functions 3 April 6th 05 04:06 PM
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
looking for a formula Amanda Excel Worksheet Functions 5 January 5th 05 07:37 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Formula Result Correct but value in the cell is wrong jac Excel Worksheet Functions 2 December 17th 04 08:05 PM


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