Simple calculations with IP addresses in Excel with VBA


To totally unlock this section you need to Log-in


Login

Thought this might be useful to somebody/someone. Ultra-super-simple Excel [gs macro] for basic IP address calculations in Excel. The [gs formula] allows you to add a number to an IP address (within the limits of the last byte). It's SUPER easy  to modify it to do other things as well (e.g. proper adding to network segments), but I think it's is a good foundation that can be hacked into the desired "shape".

Without further ado, let's get into it. What you need is:

  • An Excel sheet that can eat [gs macro]s (Open a new Excel [gs worksheet] and save it as .xlsm NOT .xlsx)
  • Open the coding screen (Visual Basic for Applications for you, 31337 office c0derz). Alt-F11 for the [n00b]s that can't find the button :-)
  • Using the Insert menu, add a new module (Insert->Module)
  • Paste the code:

  • To totally unlock this section you need to Log-in


    Login

    1 thought on “Simple calculations with IP addresses in Excel with VBA”

    Comments are closed.