+ Reply to Thread
Results 1 to 4 of 4

Identify 1 IP address from a cell with multiple IPs match against legend of IP segments

  1. #1
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Identify 1 IP address from a cell with multiple IPs match against legend of IP segments

    Hi,

    Would like to find a formula to Identify 1 IP address from a cell which has multiple IPs match against the legend of IP segments.

    Can anyone assist for a solution. Please refer to a attached file. Thank you.

    Chitra
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Identify 1 IP address from a cell with multiple IPs match against legend of IP segment

    Try this array formula in B4, copy down as needed.

    =IFERROR(TRIM(MID(SUBSTITUTE(A4," ",REPT(" ",50)),LOOKUP(1E+100,SEARCH($A$10:$A$13,SUBSTITUTE(A4," ",REPT(" ",50)))),50)),"No Match")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  3. #3
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Re: Identify 1 IP address from a cell with multiple IPs match against legend of IP segment

    Hi Jason,

    It working when the 3 set of IP is 2 digit but for 3 digit. Example 11.11.16 (working) but if it's 11.11.161 (not working)
    Please refer to example for your reference.


    Regards
    Chitra
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Identify 1 IP address from a cell with multiple IPs match against legend of IP segment

    The formula was not checking the number of digits, only that it was a match for what was found.

    11.111.169.38 was being matched to 11.111.16 in the segment list.

    With A6, there are 3 possible matches to 11.12.16, the way I had set up the formula, it would always return the first match in this scenario, even if it was not the correct one.

    11.12.161.48
    11.12.16.52
    11.12.160.48
    11.12.65.48

    This revised formula gives the correct results in the sample file. Any blank cells in the I.P. segment table will cause the formula to fail. I've used a dynamic range to find the last I.P. address in the table, but if you have any blanks in the middle then they will cause problems.

    =IFERROR(TRIM(MID(SUBSTITUTE(A4," ",REPT(" ",50)),LOOKUP(1E+100,SEARCH($A$17:INDEX($A:$A,MATCH("ZZZZ",$A:$A))&".",SUBSTITUTE(A4," ",REPT(" ",50)))),50)),"No Match")

+ 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. Macro to parse address lines with @ symbol between segments
    By mjwillyone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2017, 09:46 AM
  2. Identify cell address of cell displayed in top left-hand corner of screen
    By DD1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2014, 08:34 PM
  3. Identify cells that contain a match to a cell in another column
    By Calab in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-25-2013, 06:03 AM
  4. Replies: 0
    Last Post: 11-06-2012, 08:10 AM
  5. [SOLVED] (1) Identify address which contains a certain string; (2) Way to condensate multiple IF
    By Lethe in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-18-2012, 04:34 AM
  6. Lookup/Index-Match-Match using segments
    By BRISBANEBOB in forum Excel General
    Replies: 11
    Last Post: 06-10-2009, 03:45 AM
  7. how to identify a cell address
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2006, 03:40 PM

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