ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula to show PC name, or IP, or personal windows ID (https://www.excelbanter.com/excel-discussion-misc-queries/68000-formula-show-pc-name-ip-personal-windows-id.html)

nkoichev

Formula to show PC name, or IP, or personal windows ID
 

Is it posible some formula to show PC name, or IP, or personal windows
ID?
...or some computer characteristic that is different on every computer.


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile: http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014


Bob Phillips

Formula to show PC name, or IP, or personal windows ID
 
environ("ComputerName")

environ("UserName")

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"nkoichev" wrote in
message ...

Is it posible some formula to show PC name, or IP, or personal windows
ID?
..or some computer characteristic that is different on every computer.


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile:

http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014




paul

Formula to show PC name, or IP, or personal windows ID
 
the cell or info functions may reveal something you can use to identify a
certain user/computer.I have asked users to input or choose a name to
identify themselves/computer/printer
--
paul
remove nospam for email addy!



"Bob Phillips" wrote:printer
environ("ComputerName")

environ("UserName")

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"nkoichev" wrote in
message ...

Is it posible some formula to show PC name, or IP, or personal windows
ID?
..or some computer characteristic that is different on every computer.


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile:

http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014





nkoichev

Formula to show PC name, or IP, or personal windows ID
 

There's no such a formulas in excel like "=environ("ComputerName")

=environ("UserName")" !?

The result is "#NAME?"!


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile: http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014


Steve Yandl

Formula to show PC name, or IP, or personal windows ID
 
It's part of VBA.

Create a macro like

Sub GetUserName()
MsgBox Environ("UserName")
End Sub

run and see what you get. Instead of creating a subroutine, you could write
a custom function and the variables would be available the same as standard
Excel functions.

Steve

"nkoichev" wrote in
message ...

There's no such a formulas in excel like "=environ("ComputerName")

=environ("UserName")" !?

The result is "#NAME?"!


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile:
http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014




Bob Phillips

Formula to show PC name, or IP, or personal windows ID
 
If you want it in a worksheet, create a UDF

Function attr(choice as string)
select case lower(choice)
case "computer": attr = Environ("Computername")
case "user": attr = Environ("UserName"
end select
End Function

and use like

=attr("User")

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"nkoichev" wrote in
message ...

There's no such a formulas in excel like "=environ("ComputerName")

=environ("UserName")" !?

The result is "#NAME?"!


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile:

http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014




David McRitchie

Formula to show PC name, or IP, or personal windows ID
 
Belongs in VBA
missed the other replies, but there are still a couple of items
that were not mentioned.

install the following user defined function, if you need instructions see
http://www.mvps.org/dmcritchie/excel/getstarted.htm

function udf_ComputerName()
udf_computername = environ("ComputerName")
end function

=udf()
=personal.xls!udf()

More information on
http://www.mvps.org/dmcritchie/excel/property.htm

You can test in Intermediate (Ctrl+G) window of the VBE

msgbox environ("computername")

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"nkoichev" wrote in message
...

There's no such a formulas in excel like "=environ("ComputerName")

=environ("UserName")" !?

The result is "#NAME?"!


--
nkoichev
------------------------------------------------------------------------
nkoichev's Profile: http://www.excelforum.com/member.php...o&userid=30926
View this thread: http://www.excelforum.com/showthread...hreadid=506014






All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com