In most of the online resource I can find usually show me how to retrieve this information in VBA. Is there any direct way to get this information in a cell?
For example
The simplest way is to create a VBA macro that wraps that function, like so:
Function UserNameWindows() As String UserName = Environ("USERNAME") End Function
Then call it from the cell:
=UserNameWindows()
See this article for more details, and other ways.