Share via

formula '=USERNAME()' doesn't work

Anonymous
2023-03-15T16:57:26+00:00

i am trying to use USERNAME function to automatically write name of the user in excel sheet into a cell. It keeps showing me #name? error.

I have tried to enable iteration calculation or use just =user() formula but it doesnt work either

I am using microsoft 365 for businesses

Thank you

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-03-15T17:25:02+00:00

    There is no function USERNAME, nor is there a USER.

    Try this - for desktop versions of 365.

    =LET(fullpath, INFO("DIRECTORY"),path, SUBSTITUTE(fullpath, "C:\Users", ""),LEFT(path, FIND("", path) - 1))

    You can also use VBA, but that also requires desktop Excel.

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments