+ Reply to Thread
Results 1 to 4 of 4

In Excel, how do I insert User Name (author) in a cell.

  1. #1
    George B.
    Guest

    In Excel, how do I insert User Name (author) in a cell.

    The function =CELL("filename",A1) returns a file name and sheet name in a
    cell. How can I obtain the User Name?

  2. #2
    Registered User
    Join Date
    08-18-2005
    Posts
    59

    RE: In Excel, how do I insert User Name (author) in a cell.

    You can write some VBA to do it.

    Sub Return_UserName()

    Sheets("sheet1").Range("A2").Value = Application.UserName

    End Sub
    Excel_Geek
    http://blog.excelgeek.com/

    "...I'll do that in Excel for $50..."

  3. #3
    Registered User
    Join Date
    08-18-2005
    Posts
    59

    RE: In Excel, how do I insert User Name (author) in a cell.

    And to return just the filename (if you like) you can use this formula:

    =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)

  4. #4
    George B.
    Guest

    Re: In Excel, how do I insert User Name (author) in a cell.

    Very nice. This is going into my Macro Toolkit.

    "Excel_Geek" wrote:

    >
    > You can write some VBA to do it.
    >
    > Sub Return_UserName()
    >
    > Sheets("sheet1").Range("A2").Value = Application.UserName
    >
    > End Sub
    >
    >
    > --
    > Excel_Geek
    >
    >
    > ------------------------------------------------------------------------
    > Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423
    > View this thread: http://www.excelforum.com/showthread...hreadid=398347
    >
    >


+ 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