+ Reply to Thread
Results 1 to 4 of 4

incrementing ip addresses in worksheet

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

    incrementing ip addresses in worksheet

    i want to put an ip address in CELL a1 eg 10.10.25.0
    then in say c1 id like to see this calculated 10.10.25.0+1 ie 10.10.25.1.

    sum doesnt work. autofill can do it but i need to have this calculate in any cell for 10.10.25.0+x

    any ideas anyone?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =LEFT(A1,9)&MID(A1,10,10)+1
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    thanks that works fine for 10.10.x.x, but not for any ip eg 192.200.56.30
    i found this and it works for any xxx.xxx.xxx.xxx
    =LEFT(A1,FIND("x",Substitute(A1,".","x",3))-1)&"."&(MID(A1,FIND("x",Substitute(A1,".","x",3))+1,3)+1)

    seems a tad long but it works! cant for the life of me see how tho!

  4. #4
    Registered User
    Join Date
    01-22-2022
    Location
    Mumbai
    MS-Off Ver
    Office365
    Posts
    1

    Red face Re: incrementing ip addresses in worksheet

    Quote Originally Posted by martindwilson View Post
    thanks that works fine for 10.10.x.x, but not for any ip eg 192.200.56.30
    i found this and it works for any xxx.xxx.xxx.xxx
    =LEFT(A1,FIND("x",Substitute(A1,".","x",3))-1)&"."&(MID(A1,FIND("x",Substitute(A1,".","x",3))+1,3)+1)

    seems a tad long but it works! cant for the life of me see how tho!
    Thanks a lot, works like a charm..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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