Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    extract IP address from string (2000)

    Good morning. I have a field ("LocalIPAddress") containing IP and port information (ex. 160.10.50.12:5234) Is there a simple way to create an update query that will strip everything after the colon leaving just the IP address? I have tried the left function Left([IPAddress],15 but it doesn't accomodate shorter addresses. Thanks for any help. - scott

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: extract IP address from string (2000)

    Hi,
    Update the field to:
    Left([LocalIPAddress],InStr([LocalIPAddress],":")-1)
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: extract IP address from string (2000)

    That did it. Thanks for the help. -scott

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •