+ Reply to Thread
Results 1 to 11 of 11

Extract IP Address from heavily populated cell

  1. #1
    Registered User
    Join Date
    04-07-2010
    Location
    Boise, ID
    MS-Off Ver
    Version 2003 (Build 12624.20466)
    Posts
    33

    Question Extract IP Address from heavily populated cell

    I have tried searching this forum, and Googled as well to no avail.

    There is an IP address in this cell that I need to extract. Since there are multiple ":", I can't seem to find a way to get this information extracted. Any help is appreciated. Sample attached.

    Thanks in advance,

    Mike
    Attached Files Attached Files
    Last edited by reem01; 05-06-2020 at 01:32 PM. Reason: Solved

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Extract IP Address from heavily populated cell

    Is it always preceded by Source Network Address?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-07-2010
    Location
    Boise, ID
    MS-Off Ver
    Version 2003 (Build 12624.20466)
    Posts
    33

    Re: Extract IP Address from heavily populated cell

    Yes, I checked the majority of the cells, and that seems to always be the case.

    Thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Extract IP Address from heavily populated cell

    Try this:

    =TRIM(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("Address",A1),30),"Source",""),"Address:",""))

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Extract IP Address from heavily populated cell

    Perhaps try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Ali, I don't think your formula takes into account IP's of other lengths. I tried one that is xxx.xxx.xxx.xxx and it returned "xxx.xxx.xxx.xxxSour", and "xx.x.x.x" returned "xx.x.x.x Port".

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Extract IP Address from heavily populated cell

    Another option
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract IP Address from heavily populated cell

    Please try

    =MID(LEFT(A1,FIND("Port:",A1)-3),FIND("Address:",A1)+8,15)

  8. #8
    Registered User
    Join Date
    04-07-2010
    Location
    Boise, ID
    MS-Off Ver
    Version 2003 (Build 12624.20466)
    Posts
    33

    Re: Extract IP Address from heavily populated cell

    Thank you all so much! Ali's worked, but as mentioned by Paul, it does append some characters on some of the results. The last 3 formulas from Paul, ChemistB, and Bo_Ry all worked perfectly.

  9. #9
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Extract IP Address from heavily populated cell

    Really?

    Of the formulas provided, only Chemist's and mine seem to work for varying IP address lengths. Tested with IP's of length x.x.x.x through xxx.xxx.xxx.xxx. Ali and Bo_Ry's work for some of the lengths, but not all.

  10. #10
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Extract IP Address from heavily populated cell

    Not short but
    Please Login or Register  to view this content.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract IP Address from heavily populated cell

    Correction for all IP's of length and remove Line Feed

    =MID(LEFT(A1,FIND("Port:",A1)-10),FIND("Address:",A1)+9,16)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 11
    Last Post: 01-23-2017, 11:40 AM
  2. Replies: 3
    Last Post: 09-30-2016, 10:48 AM
  3. [SOLVED] Adding an e-mail address to an already populated cell
    By bralew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2016, 10:25 AM
  4. [SOLVED] extract an address from multple words and a number in a cell
    By excelZen in forum Excel General
    Replies: 5
    Last Post: 01-30-2015, 03:37 PM
  5. extract email address from the cell if it matches one from the list
    By mumsys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2014, 10:34 AM
  6. [SOLVED] Extract Zip Code from the address in a single cell
    By maacmaac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 11:29 AM
  7. Extract House Number from Street Address into new Cell
    By tamorgen in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-20-2011, 07:48 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1