Link to home
Start Free TrialLog in
Avatar of TechnologyMangu
TechnologyMangu

asked on

Extract Octets from IP Address

What formula or set of formulas can I use to extract octets from an IP Address?

Supposing I have 192.1.2.3 in A1 and want 192 in A2, 1 in A3, 2 in A4, and 3 in A5
ASKER CERTIFIED SOLUTION
Avatar of Grasty86
Grasty86
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of als315
You can also add function:
Public Function GetOct(A As String, Oct As Integer) As Integer
' A - IP address, Oct - Octet number from left to right, starting from 0
Dim B() As String
B = Split(A, ".")
GetOct = CInt(B(Oct))
End Function

Open in new window

BKOctets.xls
Avatar of TechnologyMangu
TechnologyMangu

ASKER

Duh me. :) Thank you.