Excel incrementing IP addresses

Robertson1995

Board Regular
Joined
Apr 1, 2009
Messages
121
I have a spreadsheet that contains numerous IP addresses. What I need is if I have for example 10.125.190.55 in Cell A1, in Cell D1 in need this IP address plus 1 which would be 10.125.190.56. Its not recognizing it in the IP format. Is this a formatting issue or is there a formula to make this work?
 
It substitutes the . in the IP address with 255 spaces. Then uses the RIGHT function to return the rightmost 255 characters from the substituted value. Trim is then used to remove excess spaces.


Hi VoG, I'm still not understanding why you need to insert a number of spaces, but I went another route. I ended up breaking this problem down into "chunks". I placed a formula in one cell that would locate how many positions over the last decimal point was. I then plugged that into another formula (in another cell) to grab the last octet (which also grabbed the decimal point as well). On the next cell, I stripped the decimal point and added one to the last octet, then on the final cell I used the CONCATENATE command to put it all together. I just found this way easier to understand.

I appreciate you helping out regardless. There are many ways to do one thing.

Andy
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,225,157
Messages
6,183,247
Members
453,152
Latest member
ChrisMd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top