+ Reply to Thread
Results 1 to 2 of 2

Bulk IP address and Subnet mask to CIDR conversion

  1. #1
    Registered User
    Join Date
    07-16-2019
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    1

    Bulk IP address and Subnet mask to CIDR conversion

    I have a task to convert a whole heap of IP address to their CIDR notation and would like to do this in Excel

    I have
    Column A = IP Address
    Column B = Subnet Mask
    ie
    10.227.68.2 255.255.255.0
    10.227.69.2 255.255.254.0
    10.227.80.192 255.255.255.128


    On another worksheet i have a table with the subnet and CIDR so i can do a VLOOKUP
    ie
    ....
    255.255.252.0 /22
    255.255.254.0 /23
    255.255.255.0 /24
    255.255.255.128 /25
    255.255.255.192 /26
    ....

    Would like a formula that can then take that information and create the full CIDR notation in column C
    Network ID/CIDR

    From the above example the output should be:
    10.227.68.2 255.255.255.0 10.227.68.0/24
    10.227.71.2 255.255.254.0 10.227.70.0/23
    10.227.80.192 255.255.255.128 10.227.80.128/25

    I have failed multiple times in creating this and there is a lot of forums asking for the opposite CIDR to subnet mask
    Attached Files Attached Files
    Last edited by Ni99leS404; 07-17-2019 at 01:04 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Bulk IP address and Subnet mask to CIDR conversion

    Welcome to the forum.

    Will you please attach a small sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. [SOLVED] Calculating CIDR from ipaddress and subnet mask
    By jsbsmd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-20-2022, 03:45 PM
  2. Convert Subnet address and mask to CIDR and vice-versa
    By redrockrobbo in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-16-2018, 03:31 AM
  3. Excel IP Mask and Subnet ID
    By fish221171 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-30-2017, 08:11 AM
  4. Replies: 3
    Last Post: 12-12-2013, 11:13 AM
  5. Generating IP addressses from a IP address and Subnet mask
    By syedaley in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2013, 05:11 AM
  6. Need to take an IP Subnet Range and Output Subnet Mask
    By Markh7999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2013, 08:53 PM
  7. Excel 2007 : tcpip IP Network Address/Subnet Mask/IP Range
    By dan_in-need-of-help in forum Excel General
    Replies: 1
    Last Post: 08-10-2010, 03:16 AM

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