+ Reply to Thread
Results 1 to 13 of 13

Formula for Excel User Name

  1. #1
    Shelll
    Guest

    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. #2
    Gord Dibben
    Guest

    Re: Formula for Excel User Name

    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 Insert>Module. 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 <[email protected]>
    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. #3
    Bob Phillips
    Guest

    Re: Formula for Excel User Name


    thisUser = Environ("Username")

    --
    HTH

    Bob Phillips

    "Shelll" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #4
    paul
    Guest

    Re: Formula for Excel User Name

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

    --
    paul
    remove nospam for email addy!



    "Bob Phillips" wrote:

    >
    > thisUser = Environ("Username")
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "Shelll" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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. #5
    Bob Phillips
    Guest

    Re: Formula for Excel User Name

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

    Bob

    "paul" <[email protected]> wrote in message
    news:[email protected]...
    > =CELL("filename")
    > =INFO("directory")
    > might help.
    >
    > --
    > paul
    > remove nospam for email addy!
    >
    >
    >
    > "Bob Phillips" wrote:
    >
    > >
    > > thisUser = Environ("Username")
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > "Shelll" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > 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. #6
    Harlan Grove
    Guest

    Re: Formula for Excel User Name

    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. #7
    paul
    Guest

    Re: Formula for Excel User Name

    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" <[email protected]> wrote in message
    > news:[email protected]...
    > > =CELL("filename")
    > > =INFO("directory")
    > > might help.
    > >
    > > --
    > > paul
    > > remove nospam for email addy!
    > >
    > >
    > >
    > > "Bob Phillips" wrote:
    > >
    > > >
    > > > thisUser = Environ("Username")
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > "Shelll" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > 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. #8
    Bob Phillips
    Guest

    Re: Formula for Excel User Name

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

    --
    HTH

    Bob Phillips

    "paul" <[email protected]> wrote in message
    news:[email protected]...
    > 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" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > =CELL("filename")
    > > > =INFO("directory")
    > > > might help.
    > > >
    > > > --
    > > > paul
    > > > remove nospam for email addy!
    > > >
    > > >
    > > >
    > > > "Bob Phillips" wrote:
    > > >
    > > > >
    > > > > thisUser = Environ("Username")
    > > > >
    > > > > --
    > > > > HTH
    > > > >
    > > > > Bob Phillips
    > > > >
    > > > > "Shelll" <[email protected]> wrote in message
    > > > > news:[email protected]...
    > > > > > 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. #9
    David McRitchie
    Guest

    Re: Formula for Excel User Name

    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" <[email protected]> wrote in message news:[email protected]...
    > 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" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > =CELL("filename")
    > > > =INFO("directory")
    > > > might help.
    > > >
    > > > --
    > > > paul
    > > > remove nospam for email addy!
    > > >
    > > >
    > > >
    > > > "Bob Phillips" wrote:
    > > >
    > > > >
    > > > > thisUser = Environ("Username")
    > > > >
    > > > > --
    > > > > HTH
    > > > >
    > > > > Bob Phillips
    > > > >
    > > > > "Shelll" <[email protected]> wrote in message
    > > > > news:[email protected]...
    > > > > > 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. #10
    paul
    Guest

    Re: Formula for Excel User Name

    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" <[email protected]> wrote in message news:[email protected]...
    > > 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" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > =CELL("filename")
    > > > > =INFO("directory")
    > > > > might help.
    > > > >
    > > > > --
    > > > > paul
    > > > > remove nospam for email addy!
    > > > >
    > > > >
    > > > >
    > > > > "Bob Phillips" wrote:
    > > > >
    > > > > >
    > > > > > thisUser = Environ("Username")
    > > > > >
    > > > > > --
    > > > > > HTH
    > > > > >
    > > > > > Bob Phillips
    > > > > >
    > > > > > "Shelll" <[email protected]> wrote in message
    > > > > > news:[email protected]...
    > > > > > > 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.
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >


  11. #11
    Registered User
    Join Date
    02-05-2020
    Location
    Nairobi, Kenya
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Formula for Excel User Name

    You can use DAX formula USERNAME by creating an Excel Data Model.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Formula for Excel User Name

    Did you see the date of the last post? You are 15 years too late ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  13. #13
    Registered User
    Join Date
    02-05-2020
    Location
    Nairobi, Kenya
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Formula for Excel User Name

    Quote Originally Posted by AliGW View Post
    Did you see the date of the last post? You are 15 years too late ...
    I posted to help others since the question can be solved without the use of VBA.
    All previous solutions were VBA oriented.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1