+ Reply to Thread
Results 1 to 11 of 11

Excel IP Mask and Subnet ID

  1. #1
    Registered User
    Join Date
    02-05-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    29

    Excel IP Mask and Subnet ID

    Hello Again all,

    I wonder if someone can advise if there is a simple way of getting the Mask Bits and Subnet ID. Say I have the following Info in the cells:

    Cell (A) has the IP addresses eg. 192.168.0.1 and Cell (B) has the SubNet Mask of 255.255.255.0. What I would like to do is have excel work out what the mask and ID are. So in the example I gave Cell (C) would be Mask Bits "/24" and Cell (D) would be SubNet ID 192.168.0.0

    Using http://www.subnet-calculator.com/ is great but not for lots of IP's and I don't want to do it manually lol.

    I have added a sample file which has 2 sheets. Input sheet is the list of IP addresses I have an export from our systems and the result I am looking for is in the Output sheet. I can do this manually with an Online calculator but that will take me days
    Attached Files Attached Files
    Last edited by fish221171; 02-06-2014 at 05:40 PM.

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

    Re: Excel IP Mask and Subnet ID

    are you only working with class c addresses?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel IP Mask and Subnet ID

    Hi,

    Can you explain the rule/translation that gives the two results you expect from the two pieces of original data?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: Excel IP Mask and Subnet ID

    255.255.255.0 is a 24 bit mask therefore shorthand is /24 and would be the subnet 192.168.0.0 to 192.168.0.255 thats the premise!

    255.255.255.0 /24
    255.255.255.128 /25
    255.255.255.192 /26
    255.255.255.224 /27
    255.255.255.240 /28
    255.255.255.248 /29
    255.255.255.252 /30
    got to go out now but i probably have an excel subnet calculator somewhere
    Last edited by martindwilson; 02-06-2014 at 10:30 AM.

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Excel IP Mask and Subnet ID

    There's an Add-in with various IP UDFs here.

    http://www.slideshare.net/rajivss/ip...ntationgen-v11
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  6. #6
    Registered User
    Join Date
    02-05-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Excel IP Mask and Subnet ID

    Addresses could be anything, I need someway of working out the / part in Excel as I have over 400 IP's and Subnet's.

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

    Re: Excel IP Mask and Subnet ID

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  8. #8
    Registered User
    Join Date
    02-05-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Excel IP Mask and Subnet ID

    Quote Originally Posted by martindwilson View Post
    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Thanks Martin Wilson I have uploaded a sample sheet.

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

    Re: Excel IP Mask and Subnet ID

    simple subnet calc attached
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-05-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Excel IP Mask and Subnet ID

    Martin,

    That is just brilliant working great for Class C, can you amend this for Class A & B?

    Thanks
    Last edited by fish221171; 02-06-2014 at 05:41 PM.

  11. #11
    Registered User
    Join Date
    08-30-2017
    Location
    Pune
    MS-Off Ver
    2013
    Posts
    1

    Re: Excel IP Mask and Subnet ID

    Hello Martin,

    This is exactly the same thing even I am looking for. Request you to make same for Class A & B.

    I understand the post is very old... however please if someone could assist on the excel sheet. It would be a blessing.

    Regards,

    M

+ 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. Creating IP Ranges from IP Add (Network) and Subnet Mask
    By dan_in-need-of-help in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 01-07-2015, 12:17 PM
  2. Replies: 3
    Last Post: 12-12-2013, 11:13 AM
  3. 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
  4. 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
  5. Creating the IP ranges from the IP and the subnet mask
    By hari6677 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 11:27 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