+ Reply to Thread
Results 1 to 7 of 7

Change IP in specific Octets using formulas..

  1. #1
    Registered User
    Join Date
    04-17-2014
    Location
    Elkridge
    MS-Off Ver
    excel 2010
    Posts
    2

    Change IP in specific Octets using formulas..

    IN Cell C14 I have an IP 10.7.182.1
    I need that value +1 in the 3rd octet of c18

    so my output would be 10.7.183.1


    I also have an IP address that needs to be in cell6b that needs the first 3 octets copied but with a different value for the 4th octet in another cell.



    Please help, if possible.
    Last edited by kmdiaopm; 04-17-2014 at 11:00 AM.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: TWO Request

    Welcome to the forum!

    Because we want all the threads to be highly searchable so people can find existing solutions, it's important to us that the title of the thread reflect what's being requested. It is, in fact, Rule Number One.

    So yours should be something like, "changing the numbers in IP octs in one cell."

    Once you've done that, we'll be happy to help you.

  3. #3
    Registered User
    Join Date
    04-17-2014
    Location
    Elkridge
    MS-Off Ver
    excel 2010
    Posts
    2

    Re: TWO Request

    Thank you so much, I have changed it.

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Change IP in specific Octets using formulas..

    Used SEARCH to find the full stop positions; and then VALUE/LEFT/RIGHT to turn those into the numbers for each Octet in helper cells; and then recomposed.

    Once you've got them as numbers in helper cells, you can do whatever kind of math on them you want.

    See attached.
    Attached Files Attached Files

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Change IP in specific Octets using formulas..

    that fails though if the octet ends in 255 as 10.7.255.1 needs to be 10.8.0.1
    try this converts ip to decimal adds 256 then converts back
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    11-09-2021
    Location
    Wokingham, UK
    MS-Off Ver
    2016
    Posts
    1

    Re: Change IP in specific Octets using formulas..

    Hi Martin. I just used this to resolve something I had been looking at for a while now. This is great. Thanks for posting.

  7. #7
    Forum Contributor
    Join Date
    04-15-2013
    Location
    Singapore, Melbourne
    MS-Off Ver
    Office 365
    Posts
    167

    Re: Change IP in specific Octets using formulas..

    I'm not a network expert. I have checked the IP address rules, it seems too complex. I'm not sure whether it is possible to generate a list of valid IP addresses through a single Excel formula.

    https://www.2000trainers.com/cisco-c...ressing-rules/

    Host ID cannot be all binary 1s
    Host ID cannot be all binary 0s
    Network ID cannot be all binary 0s
    Network ID cannot be all binary 1s
    Network ID cannot be decimal 127
    IP address cannot be all binary 0s
    IP address cannot be all binary 1s
    Network IDs of 224 and above in the first octet cannot be assigned to hosts
    Row row row your boat
    Gently down the stream

+ 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. VBA Help Request
    By Beckye in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2014, 07:39 PM
  2. Request for Help
    By Aminul Islam in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-18-2011, 05:04 AM
  3. Request
    By chsjk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-31-2006, 03:45 PM
  4. [SOLVED] sql.request
    By teepee in forum Excel General
    Replies: 2
    Last Post: 12-30-2005, 09:35 AM
  5. CHR( ) request
    By Bony Pony in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2005, 06:06 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