List all IP's found between beginning and ending targets

Danny54

Active Member
Joined
Jul 3, 2019
Messages
295
Office Version
  1. 365
Platform
  1. Windows
Is there a way to list all IP's between a starting and ending range?
(Below is sheet1 which contains one row called ranges. Each range has a beginning and ending range separated by a dash. Each group is separated by a comma. There can be many groups on this line. IP ranges end at 255 then increment the value to the left and start over with that octet and continue incrementing again) below are two ranges with starting and ending values for each range

Sheet1
A
Ranges
10.90.168.0-10.90.169.255,10.103.240.2-10.103.241.250

(the ... is removed columns that would actually have data. I removed them to shorten the listing)

Sheet2 Output
A
IP's
10.90.168.0
10.90.168.1
10.90.168.2
.....
10.90.169.254
10.90.169.255
10.103.240.2
10.103.240.3
.....
10.103.241.249
10.103.241.250


Thanks
 
Good Morning All
Once again I find that I need to transform similar data as in my previous request to data found below. Instead of inserting expanded ranges into new rows, I need them expanded them into one cell as shown in the new output sheet. Any help would be greatly appreciated.

Thanks

The input data changed to the following

TitleRanges
A10.10.10.1, 10.10.10.4-10.10.10.7
B10.10.10.20
C
D10.10.10.240-10.10.10.241
E10.10.10.250, 10.10.10.251, 10.10.10.252


New Output Sheet

TitleRangesExpanded
A10.10.10.1, 10.10.10.4-10.10.10.710.10.10.1, 10.10.10.4, 10.10.10.5, 10.10.10.6, 10.10.10.7
B10.10.10.2010.10.10.20
C
D10.10.10.240-10.10.10.24110.10.10.240, 10.10.10.241
E10.10.10.250,10.10.10.251,10.10.10.25210.10.10.250, 10.10.10.251, 10.10.10.252
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Good Morning Marc L

I've been trying to modify your example code to input a rearranged set. As you see I have more data per rol and the Ranges moved from Col b to Col F.
how do I adjust the array values to return all data in each row. The code that worked is in #9 above.

Thanks

TitlecolorownertiercirRangesshiftcreated
Abluejo
1​
ab10.1.1.0-10.1.1.5m
22-Jan​
B
Cbluesa
1​
ab11.2.1.0m
22-Jan​
Dredsa
1​
ab10.2.2.0-10.2.2.5,10.2.3.0-10.2.4.1n
22-Jan​
 
Upvote 0

Forum statistics

Threads
1,215,215
Messages
6,123,668
Members
449,114
Latest member
aides

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