+ Reply to Thread
Results 1 to 13 of 13

How to manipulate IPV6 addresses last and second last octet

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2008
    Posts
    26

    How to manipulate IPV6 addresses last and second last octet

    Hi team,
    How to manipulate IPV6 addresses last and second last octet with any Excel formula or function .
    Second last octet with = 444
    last two digit of last octet with = 05

    Eg.

    1505:800:1:300:9:1:105:1106 ==> 2405:800:1:300:9:1:444:1105
    1505:80:12:900:9:1:562:2ba ==> 2405:80:12:900:9:1:444:205
    1505:800:142:600:9:1:895:17 ==> 2405:800:142:600:9:1:444:05
    Last edited by ganesh_6663; 03-30-2019 at 12:25 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: How to manipulate IPV6 addresses last and second last octet

    Please Login or Register  to view this content.
    A
    B
    C
    2
    1505:800:1:300:9:1:105:1106 1505:800:1:300:9:1:444:1105 B2: =MaskIPV6(A2, "::::::0444:xx05")
    3
    1505:80:12:900:9:1:562:2ba 1505:80:12:900:9:1:444:205
    4
    1505:800:142:600:9:1:895:17 1505:800:142:600:9:1:444:5
    Last edited by shg; 03-30-2019 at 01:46 PM.
    Entia non sunt multiplicanda sine necessitate

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

    Re: How to manipulate IPV6 addresses last and second last octet

    IP in A1
    Please try at B1
    =REPLACE( REPLACE(A1,FIND(" ",SUBSTITUTE(A1,":"," ",7))-3,3,444),LEN(A1)-1,2,"05")

  4. #4
    Registered User
    Join Date
    12-03-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2008
    Posts
    26

    Re: How to manipulate IPV6 addresses last and second last octet

    Thank you very much , for some ip giving wrong output .


    1405:200:142:300:7:2:903:3 ==> 1405:200:142:300:7:2:88803

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2008
    Posts
    26

    Re: How to manipulate IPV6 addresses last and second last octet

    Quote Originally Posted by shg View Post
    Please Login or Register  to view this content.
    A
    B
    C
    2
    1505:800:1:300:9:1:105:1106 1505:800:1:300:9:1:444:1105 B2: =MaskIPV6(A2, "::::::0444:xx05")
    3
    1505:80:12:900:9:1:562:2ba 1505:80:12:900:9:1:444:205
    4
    1505:800:142:600:9:1:895:17 1505:800:142:600:9:1:444:5

    Thanks , But not getting output for this code . How to use it.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: How to manipulate IPV6 addresses last and second last octet

    It's a user-defined function.

    1. Copy the code from the post

    2. In Excel, press Alt+F11 to open the Visual Basic Editor (VBE)

    3. From the menu bar in the VBE window, do Insert > Module

    4. Paste the code in the window that opens

    5. Press Alt+Q to close the VBE and return to Excel

    Then insert the formula as shown.
    Last edited by shg; 03-30-2019 at 05:13 PM.

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

    Re: How to manipulate IPV6 addresses last and second last octet

    Please try

    =REPLACE( REPLACE(A1,FIND(" ",SUBSTITUTE(A1,":"," ",7))-3,3,444),LEN(A1)-1+(LEN(A1)-FIND(" ",SUBSTITUTE(A1,":"," ",7))<2),2,"05")

  8. #8
    Registered User
    Join Date
    12-03-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2008
    Posts
    26

    Re: How to manipulate IPV6 addresses last and second last octet

    Quote Originally Posted by shg View Post
    It's a user-defined function.

    1. Copy the code from the post

    2. In Excel, press Alt+F11 to open the Visual Basic Editor (VBE)

    3. From the menu bar in the VBE window, do Insert > Module

    4. Paste the code in the window that opens

    5. Press Alt+Q to close the VBE and return to Excel

    Then insert the formula as shown.

    Really thanks for your help.
    Done as u said , ut still not work.Here excel link , if possible please check .
    --------------------------------------------------------
    https()ufile.io(forward slash)slpbg

  9. #9
    Registered User
    Join Date
    12-03-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2008
    Posts
    26

    Re: How to manipulate IPV6 addresses last and second last octet

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =REPLACE( REPLACE(A1,FIND(" ",SUBSTITUTE(A1,":"," ",7))-3,3,444),LEN(A1)-1+(LEN(A1)-FIND(" ",SUBSTITUTE(A1,":"," ",7))<2),2,"05")
    Thank you very much , it work fine

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: How to manipulate IPV6 addresses last and second last octet

    Attached ...
    Attached Files Attached Files
    Last edited by shg; 03-31-2019 at 03:48 PM.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,064

    Re: How to manipulate IPV6 addresses last and second last octet

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.
    Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  12. #12
    Registered User
    Join Date
    12-03-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2008
    Posts
    26

    Re: How to manipulate IPV6 addresses last and second last octet

    This formula work fine
    =REPLACE( REPLACE(B9,FIND(" ",SUBSTITUTE(B9,":"," ",7))-3,3,888),LEN(B9)-1+(LEN(B9)-FIND(" ",SUBSTITUTE(B9,":"," ",7))<2),2,"03")

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,064

    Re: How to manipulate IPV6 addresses last and second last octet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. IPV6 Address Functions
    By Rhudi in forum Tips and Tutorials
    Replies: 3
    Last Post: 04-28-2016, 11:01 AM
  2. IPV6 Address Functions
    By Rhudi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2016, 11:31 AM
  3. [SOLVED] How to manipulate IPV6 addresses
    By d dubya in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-26-2013, 01:18 PM
  4. [SOLVED] Isolating 3rd octet in an IP address
    By ReeceB in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-16-2013, 09:36 PM
  5. Accumulate an IP address, in the last octet by +1
    By bstammer in forum Excel General
    Replies: 7
    Last Post: 04-25-2013, 03:15 PM
  6. Changing 3rd octet in an IP address
    By ReeceB in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2013, 07:31 PM
  7. IPv6 Adress Validation
    By madarekrap in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2011, 02:01 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