IP address increment

deanw55

New Member
Joined
Aug 30, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi to all,
I can't seem to find any good answer which would help me out.
1. I need Excel to set the right starting IP address when user enters the third octet (B1) -> first IP always being 192.168.X.1
2. Then to increment the IP address for Y times (Y = B2)
1661838265654.png

Hope this makes sense and you can help me out. Thank you in advance!
BR, Dean
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Welcome to the Forum!

Do you mean like this:

AB
18
23
3192.168.8.1
4192.168.8.2
5192.168.8.3
Sheet1
Cell Formulas
RangeFormula
B3:B5B3="192.168."&B1&"."&SEQUENCE(B2)
Dynamic array formulas.
 
Upvote 0
Thank you. Somehow the sequence part is what I'm looking for - I assume. But but obviously I need some more digging into this because my first IP should be 192.168.X.201 not 1 and did something worng, getting the Spill error...

1661843135231.png
 
Upvote 0
It's a single cell formula, and you'll need to allow room to let it spill, i.e. don't have any other values or formulae in the way.

AB
18
2201
33
4192.168.8.201
5192.168.8.202
6192.168.8.203
Sheet1
Cell Formulas
RangeFormula
B4:B6B4="192.168."&B1&"."&SEQUENCE(B3,,B2)
Dynamic array formulas.
 
Upvote 0
Hm. Not quite sure how to solve this now. When I put this formula into my table it spills and not working
1661843935225.png


If I move the same formula out of my table in an empty cell in the same worksheet it's working as supposed.
1661843964654.png


What am I missing? Thank you in advance.
 
Upvote 0
Hm. Not quite sure how to solve this now. When I put this formula into my table it spills and not working
View attachment 72777

If I move the same formula out of my table in an empty cell in the same worksheet it's working as supposed.
View attachment 72778

What am I missing? Thank you in advance.


Ok, now I converted the table to Range and it works fine. Will see if that's acceptable for all other functions I'm using.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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