Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
=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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple Condition Sumif Formula | Excel Worksheet Functions | |||
revert formula insertion to old method | Setting up and Configuration of Excel | |||
looking for a formula | Excel Worksheet Functions | |||
Help with macro formula and variable | Excel Worksheet Functions | |||
Formula Result Correct but value in the cell is wrong | Excel Worksheet Functions |