Whom it may concern: I am trying to find the formula for finding specific sections in a string.
My string format:
<USER> ; <MAC> ; <IP> ; <SN> ; <OFFICE> ; <ADMIN>
Example:
john.key ; MAC: 00:18:8B6:29:B6 ; IP: 192.168.1.1 ; SN: ####### ; US ARMY ; SPC John Key
What would be the formula to display just the MAC?
00:18:8B6:29:B6
Similar Excel formula would be:
What would be the formula to display just the IP?
192.168.1.1
And
What would be the formula to display just the SN?
#######
Similar Excel formula would be:
VBScript code to find strings:
V/r,
SPC Key
United States Army
My string format:
<USER> ; <MAC> ; <IP> ; <SN> ; <OFFICE> ; <ADMIN>
Example:
john.key ; MAC: 00:18:8B6:29:B6 ; IP: 192.168.1.1 ; SN: ####### ; US ARMY ; SPC John Key
What would be the formula to display just the MAC?
00:18:8B6:29:B6
Similar Excel formula would be:
Code:
=RIGHT(MID(A1,FIND("MAC: ",A15),22),17)
What would be the formula to display just the IP?
192.168.1.1
And
What would be the formula to display just the SN?
#######
Similar Excel formula would be:
Code:
=RIGHT(MID(F15,FIND("IP: ",F15),29),7)
VBScript code to find strings:
Code:
strInformation = "john.key ; MAC: 00:18:8B:D6:29:B6 ; IP: 192.168.1.1 ; SN: ####### ; US ARMY ; SPC John Key"
[COLOR=red] some formulas here [/color]
wscript.echo strMAC
wscript.echo strIP
wscript.echo strSN
V/r,
SPC Key
United States Army