Forum Discussion
Ashley315
Mar 13, 2024Copper Contributor
Populate Username without VBA?
Is there a way to populate the Excel user's name in a cell w/o using VBA?
Trying an IF functio nthat would populate username if data is entered in a corresponding cell. However, I cannot use C:\Users because this is a shared workbook. Trying to avoid VBA due to security/automation challenges. Can I somehow pull the username from the Excel account info and populate using a formula?
Current formula: =IF(C2<>"",IF(E2="", LET(fullpath,INFO("DIRECTORY"),path,SUBSTITUTE(fullpath,"C:\Users\",""),LEFT(path,FIND("\",path)-1)),E2),"")
For the shared workbook filepath could not include username at all.
Afraid that's with VBA.
5 Replies
Sort By
For the shared workbook filepath could not include username at all.
Afraid that's with VBA.
- Ashley315Copper Contributor
SergeiBaklan Thanks for confirming. Is there a way I can access the Excel Username and not the username from the file path?
- m_tarlerBronze Contributor
are scripts allowed? they won't autorun or accessable using a function but can run on a button press and can get you the username that is logged in to excel.
Besides, won't that formula keep changing the "username" based on the folder it is in. So even if you could do a trick to get the user name based on the user directory, as soon as someone else opens it the formula would update to that new persons name. For a 1-time write option you really need either a macro or script or you can use power automate if you put it in sharepoint