Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
George B.
 
Posts: n/a
Default 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   Report Post  
Excel_Geek
 
Posts: n/a
Default


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

  #3   Report Post  
Excel_Geek
 
Posts: n/a
Default


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)


--
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

  #4   Report Post  
George B.
 
Posts: n/a
Default

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
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
Cannot insert a row in Excel spreadsheet fredhep Excel Worksheet Functions 3 August 16th 05 02:10 AM
Excel should have the same Insert Symbol feature as Word. KKilpatrick Excel Discussion (Misc queries) 3 April 14th 05 12:54 AM
Why can't I insert a Combo Box in Excel? mpatters Excel Discussion (Misc queries) 1 April 6th 05 11:07 PM
Excel document properties insert into a cell Mark Excel Discussion (Misc queries) 3 December 16th 04 03:05 PM
Can I insert digital signatures into an Excel cell? DrewAtNucorUtah Excel Discussion (Misc queries) 1 December 15th 04 07:00 PM


All times are GMT +1. The time now is 11:41 AM.

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"