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?
0
Utf
8/23/2005 6:59:20 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
1093 Views

Similar Articles

[PageSpeed] 45

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?action=getinfo&userid=26423
View this thread: http://www.excelforum.com/showthread.php?threadid=398347

0
8/23/2005 9:47:58 PM
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?action=getinfo&userid=26423
View this thread: http://www.excelforum.com/showthread.php?threadid=398347

0
8/23/2005 9:49:44 PM
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?action=getinfo&userid=26423
> View this thread: http://www.excelforum.com/showthread.php?threadid=398347
> 
> 
0
GeorgeB (1)
8/23/2005 10:46:02 PM
Reply:

Similar Artilces: