+ Reply to Thread
Results 1 to 7 of 7

1st 3 octets get subnet translated

  1. #1
    Registered User
    Join Date
    02-19-2018
    Location
    Mysore
    MS-Off Ver
    2013
    Posts
    6

    1st 3 octets get subnet translated

    Anything within the 10.192.0.0 /13 subnet, the 1st 3 octets get subnet translated to 192.168.0

    • Subnets from 10.192.0 to 10.199.255 get translated to 192.168.0
    • Examples
    o 10.192.0.5  192.168.0.5
    o 10.192.0.55  192.168.0.55
    o 10.199.255.5  192.168.0.5
    o 10.199.255.55  192.168.0.55

    tried to perform above task using substitute but as there are two many condition it haven't helped any suggestion folks

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: 1st 3 octets get subnet translated

    In A1 Cell
    10.199.255.55


    In B1 Cell

    =IFERROR("192.168.0."&MID(A1,FIND("^",SUBSTITUTE(A1,".","^",3))+1,3),A1)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: 1st 3 octets get subnet translated

    This works

    =IF(AND(RIGHT("00"&TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",50)),(1-1)*50+1,50)),3)*10^3+RIGHT("00"&TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",50)),(2-1)*50+1,50)),3)>=10192,RIGHT("00"&TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",50)),(1-1)*50+1,50)),3)*10^3+RIGHT("00"&TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",50)),(2-1)*50+1,50)),3)<=10199),"192.168.0."&(RIGHT("00"&TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",50)),(4-1)*50+1,50)),3)+0),A1)

    Takes each part of the IP address, converts to a 3 digit number, effectively returns one long number and just does a numeric comparison on the first 6 digits


    UPDATE: Tsk! I feel so stoopid now looking at Sixthsense's incredibly short solution!
    Last edited by Special-K; 02-19-2018 at 07:37 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: 1st 3 octets get subnet translated

    Try

    1) Select range
    2) Ctrl + H (Find & Replace)
    3) Enter 10.19?.*. in find what
    4) Enter 192.168.0. in replace with
    5) click on Replace All

  5. #5
    Registered User
    Join Date
    02-19-2018
    Location
    Mysore
    MS-Off Ver
    2013
    Posts
    6

    Re: 1st 3 octets get subnet translated

    thanks for response this command is replacing new details on all series all conditions are not getting fulfilled

  6. #6
    Registered User
    Join Date
    02-19-2018
    Location
    Mysore
    MS-Off Ver
    2013
    Posts
    6

    Re: 1st 3 octets get subnet translated

    This Worked thanks Special-K

  7. #7
    Registered User
    Join Date
    02-19-2018
    Location
    Mysore
    MS-Off Ver
    2013
    Posts
    6

    Re: 1st 3 octets get subnet translated

    thanks very easy fix

+ 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. Change IP in specific Octets using formulas..
    By kmdiaopm in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-09-2021, 03:31 AM
  2. Need this PV formula translated
    By Anonymous71 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2015, 03:36 PM
  3. Hotkeys translated to Swedish
    By InNeedOfHelp12345 in forum Excel General
    Replies: 2
    Last Post: 01-15-2015, 06:20 AM
  4. [SOLVED] numerical value to be translated into a word
    By gocolonel77 in forum Excel General
    Replies: 2
    Last Post: 08-17-2013, 11:46 PM
  5. Need to take an IP Subnet Range and Output Subnet Mask
    By Markh7999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2013, 08:53 PM
  6. [SOLVED] Splitting IP Addresses on Middle Octets
    By ruezo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2012, 09:54 AM
  7. Where do I find translated terms?
    By anayeri in forum Excel General
    Replies: 2
    Last Post: 11-03-2009, 01:15 PM

Tags for this Thread

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