+ Reply to Thread
Results 1 to 8 of 8

finding 4 sets of nos. "separated by (.)" in a range

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    dubai
    MS-Off Ver
    Excel 2010
    Posts
    4

    finding 4 sets of nos. "separated by (.)" in a range

    Good day
    This is my first interaction with the forum
    My problem finding sets of IP addresses eg.
    a)173.203.136.203
    b) 203.117.126.40
    from a two column group of info in 200000 rows sample shown below
    Basically I need to find to which country code does my IP address belong

    From_IP To_IP countryCode
    223.223.160.0 223.223.164.255 JP
    223.223.165.0 223.223.167.255 AU
    223.223.168.0 223.223.175.255 KH

    Thanking you in advance
    b/regards

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: finding 4 sets of nos. "separated by (.)" in a range

    Can you attach your desired results?
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: finding 4 sets of nos. "separated by (.)" in a range

    I am not clear what is your input, what is your output? it is not clear what is in what column. Please attach a workbook. Make sure there is enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary. Remember to remove ALL confidential information first!!!

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    The paperclip icon
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    12-16-2013
    Location
    dubai
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: finding 4 sets of nos. "separated by (.)" in a range

    Out put should be in two columns
    (col1)173.203.136.203 -(col2) US
    reason
    IP address (FROM -) 173.203.136.168 (TO-) 173.203.137.199 (REFERS TO COUNTRY-) US

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: finding 4 sets of nos. "separated by (.)" in a range

    how many columns is your starting material in? Please attach a sample sheet.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: finding 4 sets of nos. "separated by (.)" in a range

    If the starting stuff is in a single column, this will return the FROM ip

    =TRIM(MID(SUBSTITUTE(" "&$A1," ",REPT(" ",125)),125*COLUMNS($A:A),125))

    and this will return the country:

    =TRIM(MID(SUBSTITUTE(" "&$A1," ",REPT(" ",125)),125*COLUMNS($A:C),125))

  7. #7
    Registered User
    Join Date
    12-16-2013
    Location
    dubai
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: finding 4 sets of nos. "separated by (.)" in a range

    I regret I am unable to attach the file, it just wont happen
    my data is in 3 columns
    (col1) From_IP
    (col2)To_IP
    (col3)countryCode
    The sample is in my first post

  8. #8
    Registered User
    Join Date
    12-16-2013
    Location
    dubai
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: finding 4 sets of nos. "separated by (.)" in a range

    Hi
    the formula should look for the value to be
    equal to or greater than value in column 1 and less than or equal to value in column2
    where this condition matches the value of column 3 should be displayed.

    Please note the values in column1 and column2 are IP addresses which means numbers separated by "."
    eg.
    1.0.127.255
    38.104.245.15
    204.239.17.255
    212.197.203.0

    I am still trying to attach a snap of the excel file.
    b/regards

+ 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: 8
    Last Post: 07-12-2017, 05:32 PM
  2. [SOLVED] Text strings separated with "/", ",", "-" or "&"
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2015, 02:13 PM
  3. Replies: 12
    Last Post: 06-12-2014, 02:11 PM
  4. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  5. Whether a number is within a range separated by "-"
    By src16 in forum Excel General
    Replies: 2
    Last Post: 01-27-2013, 11:07 PM
  6. count function-two sets of values say "yes" and "no"
    By prasjohn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2008, 12:40 PM
  7. use variable in Workbooks("book1").Worksheets("sheet1").Range("a1"
    By Luc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2005, 04:05 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